Camera and projection data for the simple software 3D pipeline. More...
#include <mxvk/include/mxvk/mxvk_math.h>
Public Member Functions | |
| void | BuildEuler (int) |
| Build the world-to-camera matrix from Euler direction angles. | |
| void | BuildEuler (int) |
| Build the world-to-camera matrix from Euler direction angles. | |
| void | BuildUVN (int) |
| Build the world-to-camera matrix from the camera position and look-at target. | |
| void | BuildUVN (int) |
| Build the world-to-camera matrix from the camera position and look-at target. | |
| Camera () | |
| Construct a camera with identity matrices. | |
| Camera () | |
| Construct a camera with identity matrices. | |
| void | CameraToPerspective (mxObject &object) const |
| Project an object's transformed vertices from camera space to perspective space. | |
| void | CameraToPerspective (mxObject &object) const |
| Project an object's transformed vertices from camera space to perspective space. | |
| void | CameraToPerspective (RenderList &list) const |
| Project a render list from camera space to perspective space. | |
| void | CameraToPerspective (RenderList &list) const |
| Project a render list from camera space to perspective space. | |
| void | Init (int camera_attr, const vec4D &camera_pos, const vec4D &camera_dir, const vec4D *camera_target, float near_z, float far_z, float fov_degrees, float width, float height) |
| Initialize camera projection, viewport, position, and direction parameters. | |
| void | Init (int camera_attr, const vec4D &camera_pos, const vec4D &camera_dir, const vec4D *camera_target, float near_z, float far_z, float fov_degrees, float width, float height) |
| Initialize camera projection, viewport, position, and direction parameters. | |
| void | InitalizeForEuler () |
| Initialize camera fields for the Euler example path. | |
| void | InitalizeForEuler () |
| Initialize camera fields for the Euler example path. | |
| void | PerspectiveToScreen (mxObject &object) const |
| Convert an object's transformed vertices from perspective coordinates to screen coordinates. | |
| void | PerspectiveToScreen (mxObject &object) const |
| Convert an object's transformed vertices from perspective coordinates to screen coordinates. | |
| void | PerspectiveToScreen (RenderList &list) const |
| Convert a render list from perspective coordinates to screen coordinates. | |
| void | PerspectiveToScreen (RenderList &list) const |
| Convert a render list from perspective coordinates to screen coordinates. | |
| void | WorldToCamera (mxObject &object) const |
| Transform an object's transformed vertices from world space to camera space. | |
| void | WorldToCamera (mxObject &object) const |
| Transform an object's transformed vertices from world space to camera space. | |
| void | WorldToCamera (RenderList &list) const |
| Transform a render list from world space to camera space. | |
| void | WorldToCamera (RenderList &list) const |
| Transform a render list from world space to camera space. | |
Public Attributes | |
| float | aspect_ratio = 1.0f |
| Viewport aspect ratio. | |
| int | attr = 0 |
| Camera attributes. | |
| Plane3D | bt_clip_plane |
| Bottom clipping plane. | |
| vec4D | dir |
| Euler camera direction in degrees. | |
| float | far_clip_z = 1000.0f |
| Far clipping plane Z. | |
| float | fov = 90.0f |
| Vertical field of view in degrees. | |
| Plane3D | lt_clip_plane |
| Left clipping plane. | |
| Mat4D | mcam |
| World-to-camera transform matrix. | |
| Mat4D | mper |
| Perspective transform matrix placeholder. | |
| Mat4D | mscr |
| Screen transform matrix placeholder. | |
| vec4D | n |
| UVN camera N basis vector. | |
| float | near_clip_z = 1.0f |
| Near clipping plane Z. | |
| vec4D | pos |
| Camera position. | |
| Plane3D | rt_clip_plane |
| Right clipping plane. | |
| int | state = 0 |
| Camera state flags. | |
| vec4D | target |
| Camera look-at target. | |
| Plane3D | tp_clip_plane |
| Top clipping plane. | |
| vec4D | u |
| UVN camera U basis vector. | |
| vec4D | v |
| UVN camera V basis vector. | |
| float | view_dist = 1.0f |
| Distance from camera to view plane. | |
| float | viewplane_height = 2.0f |
| View-plane height. | |
| float | viewplane_width = 2.0f |
| View-plane width. | |
| float | viewport_center_x = 0.0f |
| Viewport center X coordinate. | |
| float | viewport_center_y = 0.0f |
| Viewport center Y coordinate. | |
| float | viewport_height = 1.0f |
| Viewport height in pixels. | |
| float | viewport_width = 1.0f |
| Viewport width in pixels. | |
Camera and projection data for the simple software 3D pipeline.
Definition at line 1840 of file mxvk_math.h.
|
inline |
Construct a camera with identity matrices.
Definition at line 1921 of file mxvk_math.h.
|
inline |
Construct a camera with identity matrices.
Definition at line 1918 of file mxvk_math_eigen.hpp.
|
inline |
Build the world-to-camera matrix from Euler direction angles.
Definition at line 1957 of file mxvk_math.h.
|
inline |
Build the world-to-camera matrix from Euler direction angles.
Definition at line 1954 of file mxvk_math_eigen.hpp.
|
inline |
|
inline |
|
inline |
Project an object's transformed vertices from camera space to perspective space.
Definition at line 2014 of file mxvk_math.h.
|
inline |
Project an object's transformed vertices from camera space to perspective space.
Definition at line 2015 of file mxvk_math_eigen.hpp.
|
inline |
Project a render list from camera space to perspective space.
Definition at line 1998 of file mxvk_math.h.
|
inline |
Project a render list from camera space to perspective space.
Definition at line 1995 of file mxvk_math_eigen.hpp.
|
inline |
Initialize camera projection, viewport, position, and direction parameters.
Definition at line 1935 of file mxvk_math.h.
|
inline |
Initialize camera projection, viewport, position, and direction parameters.
Definition at line 1932 of file mxvk_math_eigen.hpp.
|
inline |
Initialize camera fields for the Euler example path.
Definition at line 1928 of file mxvk_math.h.
|
inline |
Initialize camera fields for the Euler example path.
Definition at line 1925 of file mxvk_math_eigen.hpp.
|
inline |
Convert an object's transformed vertices from perspective coordinates to screen coordinates.
Definition at line 2040 of file mxvk_math.h.
|
inline |
Convert an object's transformed vertices from perspective coordinates to screen coordinates.
Definition at line 2049 of file mxvk_math_eigen.hpp.
|
inline |
Convert a render list from perspective coordinates to screen coordinates.
Definition at line 2025 of file mxvk_math.h.
|
inline |
Convert a render list from perspective coordinates to screen coordinates.
Definition at line 2030 of file mxvk_math_eigen.hpp.
|
inline |
Transform an object's transformed vertices from world space to camera space.
Definition at line 1991 of file mxvk_math.h.
|
inline |
Transform an object's transformed vertices from world space to camera space.
Definition at line 1988 of file mxvk_math_eigen.hpp.
|
inline |
Transform a render list from world space to camera space.
Definition at line 1979 of file mxvk_math.h.
|
inline |
Transform a render list from world space to camera space.
Definition at line 1976 of file mxvk_math_eigen.hpp.
| float mxvk::Camera::aspect_ratio = 1.0f |
Viewport aspect ratio.
Definition at line 1909 of file mxvk_math.h.
| int mxvk::Camera::attr = 0 |
Camera attributes.
Definition at line 1846 of file mxvk_math.h.
| Plane3D mxvk::Camera::bt_clip_plane |
Bottom clipping plane.
Definition at line 1888 of file mxvk_math.h.
| vec4D mxvk::Camera::dir |
Euler camera direction in degrees.
Definition at line 1852 of file mxvk_math.h.
| float mxvk::Camera::far_clip_z = 1000.0f |
Far clipping plane Z.
Definition at line 1876 of file mxvk_math.h.
| float mxvk::Camera::fov = 90.0f |
Vertical field of view in degrees.
Definition at line 1870 of file mxvk_math.h.
| Plane3D mxvk::Camera::lt_clip_plane |
Left clipping plane.
Definition at line 1882 of file mxvk_math.h.
| Mat4D mxvk::Camera::mcam |
World-to-camera transform matrix.
Definition at line 1912 of file mxvk_math.h.
| Mat4D mxvk::Camera::mper |
Perspective transform matrix placeholder.
Definition at line 1915 of file mxvk_math.h.
| Mat4D mxvk::Camera::mscr |
Screen transform matrix placeholder.
Definition at line 1918 of file mxvk_math.h.
| vec4D mxvk::Camera::n |
UVN camera N basis vector.
Definition at line 1861 of file mxvk_math.h.
| float mxvk::Camera::near_clip_z = 1.0f |
Near clipping plane Z.
Definition at line 1873 of file mxvk_math.h.
| vec4D mxvk::Camera::pos |
Camera position.
Definition at line 1849 of file mxvk_math.h.
| Plane3D mxvk::Camera::rt_clip_plane |
Right clipping plane.
Definition at line 1879 of file mxvk_math.h.
| int mxvk::Camera::state = 0 |
Camera state flags.
Definition at line 1843 of file mxvk_math.h.
| vec4D mxvk::Camera::target |
Camera look-at target.
Definition at line 1864 of file mxvk_math.h.
| Plane3D mxvk::Camera::tp_clip_plane |
Top clipping plane.
Definition at line 1885 of file mxvk_math.h.
| vec4D mxvk::Camera::u |
UVN camera U basis vector.
Definition at line 1855 of file mxvk_math.h.
| vec4D mxvk::Camera::v |
UVN camera V basis vector.
Definition at line 1858 of file mxvk_math.h.
| float mxvk::Camera::view_dist = 1.0f |
Distance from camera to view plane.
Definition at line 1867 of file mxvk_math.h.
| float mxvk::Camera::viewplane_height = 2.0f |
View-plane height.
Definition at line 1891 of file mxvk_math.h.
| float mxvk::Camera::viewplane_width = 2.0f |
View-plane width.
Definition at line 1894 of file mxvk_math.h.
| float mxvk::Camera::viewport_center_x = 0.0f |
Viewport center X coordinate.
Definition at line 1903 of file mxvk_math.h.
| float mxvk::Camera::viewport_center_y = 0.0f |
Viewport center Y coordinate.
Definition at line 1906 of file mxvk_math.h.
| float mxvk::Camera::viewport_height = 1.0f |
Viewport height in pixels.
Definition at line 1900 of file mxvk_math.h.
| float mxvk::Camera::viewport_width = 1.0f |
Viewport width in pixels.
Definition at line 1897 of file mxvk_math.h.