![]() |
NDEVR
API Documentation
|
Provides common projection, view, and rotation matrix construction functions. More...
Static Public Member Functions | |
| static constexpr Matrix< t_type > | createOrtho (t_type left, t_type right, t_type bottom, t_type top, t_type near_plane, t_type far_plane) |
| Creates an orthographic projection matrix from the given bounds. | |
| template<class t_angle_type> | |
| static constexpr Matrix< t_type > | FrustumTransform (Angle< t_angle_type > y_field_of_view, t_type aspect_ratio, t_type near, t_type far) |
| Creates a perspective projection matrix from a field of view and aspect ratio. | |
| static constexpr Matrix< t_type > | FrustumTransform (t_type left, t_type right, t_type bottom, t_type top, t_type near, t_type far) |
| Creates a perspective projection matrix from frustum bounds. | |
| static constexpr Matrix< t_type > | OrthoFrustum (const Vector< 2, t_type > &span, t_type n, t_type f) |
| Creates an orthographic frustum matrix adjusted for Vulkan coordinate conventions. | |
| static constexpr Matrix< t_type > | Perspective (t_type fovy, t_type aspect, t_type near_plane, t_type far_plane) |
| Creates a symmetric perspective projection matrix. | |
| static constexpr Matrix< t_type > | RotationMatrix (const Vector< 3, t_type > &lookat, const Vector< 3, t_type > &up) |
| Creates a rotation-only matrix from a look-at direction and up vector. | |
| static constexpr Matrix< t_type > | ViewMatrix (const Vector< 3, t_type > &location, const Vector< 3, t_type > &lookat, const Vector< 3, t_type > &up) |
| Creates a view matrix from a camera position, look-at direction, and up vector. | |
Provides common projection, view, and rotation matrix construction functions.
Definition at line 46 of file MatrixDefinitions.h.
|
inlinestaticconstexpr |
Creates an orthographic projection matrix from the given bounds.
| [in] | left | The left clipping plane coordinate. |
| [in] | right | The right clipping plane coordinate. |
| [in] | bottom | The bottom clipping plane coordinate. |
| [in] | top | The top clipping plane coordinate. |
| [in] | near_plane | The near clipping plane distance. |
| [in] | far_plane | The far clipping plane distance. |
Definition at line 82 of file MatrixDefinitions.h.
References cast().
|
inlinestaticconstexpr |
Creates a perspective projection matrix from a field of view and aspect ratio.
| [in] | y_field_of_view | The vertical field of view angle. |
| [in] | aspect_ratio | The width-to-height aspect ratio. |
| [in] | near | The near clipping plane distance. |
| [in] | far | The far clipping plane distance. |
Definition at line 99 of file MatrixDefinitions.h.
References FrustumTransform(), and tan().
|
inlinestaticconstexpr |
Creates a perspective projection matrix from frustum bounds.
| [in] | left | The left clipping plane coordinate. |
| [in] | right | The right clipping plane coordinate. |
| [in] | bottom | The bottom clipping plane coordinate. |
| [in] | top | The top clipping plane coordinate. |
| [in] | near | The near clipping plane distance. |
| [in] | far | The far clipping plane distance. |
Definition at line 58 of file MatrixDefinitions.h.
References cast().
Referenced by FrustumTransform().
|
inlinestaticconstexpr |
Creates an orthographic frustum matrix adjusted for Vulkan coordinate conventions.
| [in] | span | The width and height of the orthographic view volume. |
| [in] | n | The near clipping plane distance. |
| [in] | f | The far clipping plane distance. |
Definition at line 113 of file MatrixDefinitions.h.
References cast().
|
inlinestaticconstexpr |
Creates a symmetric perspective projection matrix.
| [in] | fovy | The vertical field of view scale factor. |
| [in] | aspect | The width-to-height aspect ratio. |
| [in] | near_plane | The near clipping plane distance. |
| [in] | far_plane | The far clipping plane distance. |
Definition at line 186 of file MatrixDefinitions.h.
|
inlinestaticconstexpr |
Creates a rotation-only matrix from a look-at direction and up vector.
| [in] | lookat | The direction to orient toward. |
| [in] | up | The up direction vector. |
Definition at line 162 of file MatrixDefinitions.h.
References cast(), cross(), and IsInvalid().
|
inlinestaticconstexpr |
Creates a view matrix from a camera position, look-at direction, and up vector.
| [in] | location | The camera position in world space. |
| [in] | lookat | The direction the camera is looking toward. |
| [in] | up | The up direction vector for the camera. |
Definition at line 140 of file MatrixDefinitions.h.
References cast(), cross(), and IsInvalid().