:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Projection.xml. .. _class_Projection: Projection ========== Properties ---------- +-------------------------------+---------------------------------------+----------------------+ | :ref:`Vector4` | :ref:`w` | ``Vector4(0, 0, 0)`` | +-------------------------------+---------------------------------------+----------------------+ | :ref:`Vector4` | :ref:`x` | ``Vector4(1, 0, 0)`` | +-------------------------------+---------------------------------------+----------------------+ | :ref:`Vector4` | :ref:`y` | ``Vector4(0, 1, 0)`` | +-------------------------------+---------------------------------------+----------------------+ | :ref:`Vector4` | :ref:`z` | ``Vector4(0, 0, 1)`` | +-------------------------------+---------------------------------------+----------------------+ Constructors ------------ +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`Projection` **(** **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`Projection` **(** :ref:`Projection` from **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`Projection` **(** :ref:`Transform3D` from **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ Methods ------- +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`create_depth_correction` **(** :ref:`bool` flip_y **)** |static| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`create_fit_aabb` **(** :ref:`AABB` aabb **)** |static| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`create_for_hmd` **(** :ref:`int` eye, :ref:`float` aspect, :ref:`float` intraocular_dist, :ref:`float` display_width, :ref:`float` display_to_lens, :ref:`float` oversample, :ref:`float` z_near, :ref:`float` z_far **)** |static| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`create_frustum` **(** :ref:`float` left, :ref:`float` right, :ref:`float` bottom, :ref:`float` top, :ref:`float` z_near, :ref:`float` z_far **)** |static| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`create_frustum_aspect` **(** :ref:`float` size, :ref:`float` aspect, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`create_light_atlas_rect` **(** :ref:`Rect2` rect **)** |static| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`create_orthogonal` **(** :ref:`float` left, :ref:`float` right, :ref:`float` bottom, :ref:`float` top, :ref:`float` z_near, :ref:`float` z_far **)** |static| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`create_orthogonal_aspect` **(** :ref:`float` size, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`create_perspective` **(** :ref:`float` fovy, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`create_perspective_hmd` **(** :ref:`float` fovy, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov, :ref:`int` eye, :ref:`float` intraocular_dist, :ref:`float` convergence_dist **)** |static| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`determinant` **(** **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`flipped_y` **(** **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_aspect` **(** **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_far_plane_half_extents` **(** **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_fov` **(** **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_fovy` **(** :ref:`float` fovx, :ref:`float` aspect **)** |static| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_lod_multiplier` **(** **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_pixels_per_meter` **(** :ref:`int` for_pixel_width **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Plane` | :ref:`get_projection_plane` **(** :ref:`int` plane **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_viewport_half_extents` **(** **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_z_far` **(** **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_z_near` **(** **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`inverse` **(** **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_orthogonal` **(** **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`jitter_offseted` **(** :ref:`Vector2` offset **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`perspective_znear_adjusted` **(** :ref:`float` new_znear **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Operators --------- +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Projection` right **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`Projection` | :ref:`operator *` **(** :ref:`Projection` right **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector4` | :ref:`operator *` **(** :ref:`Vector4` right **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Projection` right **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector4` | :ref:`operator []` **(** :ref:`int` index **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ Constants --------- .. _class_Projection_constant_PLANE_NEAR: .. _class_Projection_constant_PLANE_FAR: .. _class_Projection_constant_PLANE_LEFT: .. _class_Projection_constant_PLANE_TOP: .. _class_Projection_constant_PLANE_RIGHT: .. _class_Projection_constant_PLANE_BOTTOM: .. _class_Projection_constant_IDENTITY: .. _class_Projection_constant_ZERO: - **PLANE_NEAR** = **0** - **PLANE_FAR** = **1** - **PLANE_LEFT** = **2** - **PLANE_TOP** = **3** - **PLANE_RIGHT** = **4** - **PLANE_BOTTOM** = **5** - **IDENTITY** = **Projection(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)** - **ZERO** = **Projection(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)** Property Descriptions --------------------- .. _class_Projection_property_w: - :ref:`Vector4` **w** +-----------+----------------------+ | *Default* | ``Vector4(0, 0, 0)`` | +-----------+----------------------+ ---- .. _class_Projection_property_x: - :ref:`Vector4` **x** +-----------+----------------------+ | *Default* | ``Vector4(1, 0, 0)`` | +-----------+----------------------+ ---- .. _class_Projection_property_y: - :ref:`Vector4` **y** +-----------+----------------------+ | *Default* | ``Vector4(0, 1, 0)`` | +-----------+----------------------+ ---- .. _class_Projection_property_z: - :ref:`Vector4` **z** +-----------+----------------------+ | *Default* | ``Vector4(0, 0, 1)`` | +-----------+----------------------+ Constructor Descriptions ------------------------ .. _class_Projection_constructor_Projection: - :ref:`Projection` **Projection** **(** **)** ---- - :ref:`Projection` **Projection** **(** :ref:`Projection` from **)** ---- - :ref:`Projection` **Projection** **(** :ref:`Transform3D` from **)** Method Descriptions ------------------- .. _class_Projection_method_create_depth_correction: - :ref:`Projection` **create_depth_correction** **(** :ref:`bool` flip_y **)** |static| ---- .. _class_Projection_method_create_fit_aabb: - :ref:`Projection` **create_fit_aabb** **(** :ref:`AABB` aabb **)** |static| ---- .. _class_Projection_method_create_for_hmd: - :ref:`Projection` **create_for_hmd** **(** :ref:`int` eye, :ref:`float` aspect, :ref:`float` intraocular_dist, :ref:`float` display_width, :ref:`float` display_to_lens, :ref:`float` oversample, :ref:`float` z_near, :ref:`float` z_far **)** |static| ---- .. _class_Projection_method_create_frustum: - :ref:`Projection` **create_frustum** **(** :ref:`float` left, :ref:`float` right, :ref:`float` bottom, :ref:`float` top, :ref:`float` z_near, :ref:`float` z_far **)** |static| ---- .. _class_Projection_method_create_frustum_aspect: - :ref:`Projection` **create_frustum_aspect** **(** :ref:`float` size, :ref:`float` aspect, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| ---- .. _class_Projection_method_create_light_atlas_rect: - :ref:`Projection` **create_light_atlas_rect** **(** :ref:`Rect2` rect **)** |static| ---- .. _class_Projection_method_create_orthogonal: - :ref:`Projection` **create_orthogonal** **(** :ref:`float` left, :ref:`float` right, :ref:`float` bottom, :ref:`float` top, :ref:`float` z_near, :ref:`float` z_far **)** |static| ---- .. _class_Projection_method_create_orthogonal_aspect: - :ref:`Projection` **create_orthogonal_aspect** **(** :ref:`float` size, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| ---- .. _class_Projection_method_create_perspective: - :ref:`Projection` **create_perspective** **(** :ref:`float` fovy, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| ---- .. _class_Projection_method_create_perspective_hmd: - :ref:`Projection` **create_perspective_hmd** **(** :ref:`float` fovy, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov, :ref:`int` eye, :ref:`float` intraocular_dist, :ref:`float` convergence_dist **)** |static| ---- .. _class_Projection_method_determinant: - :ref:`float` **determinant** **(** **)** |const| ---- .. _class_Projection_method_flipped_y: - :ref:`Projection` **flipped_y** **(** **)** |const| ---- .. _class_Projection_method_get_aspect: - :ref:`float` **get_aspect** **(** **)** |const| ---- .. _class_Projection_method_get_far_plane_half_extents: - :ref:`Vector2` **get_far_plane_half_extents** **(** **)** |const| ---- .. _class_Projection_method_get_fov: - :ref:`float` **get_fov** **(** **)** |const| ---- .. _class_Projection_method_get_fovy: - :ref:`float` **get_fovy** **(** :ref:`float` fovx, :ref:`float` aspect **)** |static| ---- .. _class_Projection_method_get_lod_multiplier: - :ref:`float` **get_lod_multiplier** **(** **)** |const| ---- .. _class_Projection_method_get_pixels_per_meter: - :ref:`int` **get_pixels_per_meter** **(** :ref:`int` for_pixel_width **)** |const| ---- .. _class_Projection_method_get_projection_plane: - :ref:`Plane` **get_projection_plane** **(** :ref:`int` plane **)** |const| ---- .. _class_Projection_method_get_viewport_half_extents: - :ref:`Vector2` **get_viewport_half_extents** **(** **)** |const| ---- .. _class_Projection_method_get_z_far: - :ref:`float` **get_z_far** **(** **)** |const| ---- .. _class_Projection_method_get_z_near: - :ref:`float` **get_z_near** **(** **)** |const| ---- .. _class_Projection_method_inverse: - :ref:`Projection` **inverse** **(** **)** |const| ---- .. _class_Projection_method_is_orthogonal: - :ref:`bool` **is_orthogonal** **(** **)** |const| ---- .. _class_Projection_method_jitter_offseted: - :ref:`Projection` **jitter_offseted** **(** :ref:`Vector2` offset **)** |const| ---- .. _class_Projection_method_perspective_znear_adjusted: - :ref:`Projection` **perspective_znear_adjusted** **(** :ref:`float` new_znear **)** |const| Operator Descriptions --------------------- .. _class_Projection_operator_neq_bool: - :ref:`bool` **operator !=** **(** :ref:`Projection` right **)** ---- .. _class_Projection_operator_mul_Projection: - :ref:`Projection` **operator *** **(** :ref:`Projection` right **)** ---- - :ref:`Vector4` **operator *** **(** :ref:`Vector4` right **)** ---- .. _class_Projection_operator_eq_bool: - :ref:`bool` **operator ==** **(** :ref:`Projection` right **)** ---- .. _class_Projection_operator_idx_Vector4: - :ref:`Vector4` **operator []** **(** :ref:`int` index **)** .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`