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 1690 of file mxvk_math.h.
|
inline |
Construct a camera with identity matrices.
Definition at line 1771 of file mxvk_math.h.
|
inline |
Construct a camera with identity matrices.
Definition at line 1732 of file mxvk_math_eigen.hpp.
|
inline |
Build the world-to-camera matrix from Euler direction angles.
Definition at line 1807 of file mxvk_math.h.
|
inline |
Build the world-to-camera matrix from Euler direction angles.
Definition at line 1768 of file mxvk_math_eigen.hpp.
|
inline |
Build the world-to-camera matrix from the camera position and look-at target.
Definition at line 1815 of file mxvk_math.h.
|
inline |
Build the world-to-camera matrix from the camera position and look-at target.
Definition at line 1776 of file mxvk_math_eigen.hpp.
|
inline |
Project an object's transformed vertices from camera space to perspective space.
Definition at line 1864 of file mxvk_math.h.
|
inline |
Project an object's transformed vertices from camera space to perspective space.
Definition at line 1826 of file mxvk_math_eigen.hpp.
|
inline |
Project a render list from camera space to perspective space.
Definition at line 1848 of file mxvk_math.h.
|
inline |
Project a render list from camera space to perspective space.
Definition at line 1809 of file mxvk_math_eigen.hpp.
|
inline |
Initialize camera projection, viewport, position, and direction parameters.
Definition at line 1785 of file mxvk_math.h.
|
inline |
Initialize camera projection, viewport, position, and direction parameters.
Definition at line 1746 of file mxvk_math_eigen.hpp.
|
inline |
Initialize camera fields for the Euler example path.
Definition at line 1778 of file mxvk_math.h.
|
inline |
Initialize camera fields for the Euler example path.
Definition at line 1739 of file mxvk_math_eigen.hpp.
|
inline |
Convert an object's transformed vertices from perspective coordinates to screen coordinates.
Definition at line 1890 of file mxvk_math.h.
|
inline |
Convert an object's transformed vertices from perspective coordinates to screen coordinates.
Definition at line 1854 of file mxvk_math_eigen.hpp.
|
inline |
Convert a render list from perspective coordinates to screen coordinates.
Definition at line 1875 of file mxvk_math.h.
|
inline |
Convert a render list from perspective coordinates to screen coordinates.
Definition at line 1838 of file mxvk_math_eigen.hpp.
|
inline |
Transform an object's transformed vertices from world space to camera space.
Definition at line 1841 of file mxvk_math.h.
|
inline |
Transform an object's transformed vertices from world space to camera space.
Definition at line 1802 of file mxvk_math_eigen.hpp.
|
inline |
Transform a render list from world space to camera space.
Definition at line 1829 of file mxvk_math.h.
|
inline |
Transform a render list from world space to camera space.
Definition at line 1790 of file mxvk_math_eigen.hpp.
| float mxvk::Camera::aspect_ratio = 1.0f |
Viewport aspect ratio.
Definition at line 1759 of file mxvk_math.h.
| int mxvk::Camera::attr = 0 |
Camera attributes.
Definition at line 1696 of file mxvk_math.h.
| Plane3D mxvk::Camera::bt_clip_plane |
Bottom clipping plane.
Definition at line 1738 of file mxvk_math.h.
| vec4D mxvk::Camera::dir |
Euler camera direction in degrees.
Definition at line 1702 of file mxvk_math.h.
| float mxvk::Camera::far_clip_z = 1000.0f |
Far clipping plane Z.
Definition at line 1726 of file mxvk_math.h.
| float mxvk::Camera::fov = 90.0f |
Vertical field of view in degrees.
Definition at line 1720 of file mxvk_math.h.
| Plane3D mxvk::Camera::lt_clip_plane |
Left clipping plane.
Definition at line 1732 of file mxvk_math.h.
| Mat4D mxvk::Camera::mcam |
World-to-camera transform matrix.
Definition at line 1762 of file mxvk_math.h.
| Mat4D mxvk::Camera::mper |
Perspective transform matrix placeholder.
Definition at line 1765 of file mxvk_math.h.
| Mat4D mxvk::Camera::mscr |
Screen transform matrix placeholder.
Definition at line 1768 of file mxvk_math.h.
| vec4D mxvk::Camera::n |
UVN camera N basis vector.
Definition at line 1711 of file mxvk_math.h.
| float mxvk::Camera::near_clip_z = 1.0f |
Near clipping plane Z.
Definition at line 1723 of file mxvk_math.h.
| vec4D mxvk::Camera::pos |
Camera position.
Definition at line 1699 of file mxvk_math.h.
| Plane3D mxvk::Camera::rt_clip_plane |
Right clipping plane.
Definition at line 1729 of file mxvk_math.h.
| int mxvk::Camera::state = 0 |
Camera state flags.
Definition at line 1693 of file mxvk_math.h.
| vec4D mxvk::Camera::target |
Camera look-at target.
Definition at line 1714 of file mxvk_math.h.
| Plane3D mxvk::Camera::tp_clip_plane |
Top clipping plane.
Definition at line 1735 of file mxvk_math.h.
| vec4D mxvk::Camera::u |
UVN camera U basis vector.
Definition at line 1705 of file mxvk_math.h.
| vec4D mxvk::Camera::v |
UVN camera V basis vector.
Definition at line 1708 of file mxvk_math.h.
| float mxvk::Camera::view_dist = 1.0f |
Distance from camera to view plane.
Definition at line 1717 of file mxvk_math.h.
| float mxvk::Camera::viewplane_height = 2.0f |
View-plane height.
Definition at line 1741 of file mxvk_math.h.
| float mxvk::Camera::viewplane_width = 2.0f |
View-plane width.
Definition at line 1744 of file mxvk_math.h.
| float mxvk::Camera::viewport_center_x = 0.0f |
Viewport center X coordinate.
Definition at line 1753 of file mxvk_math.h.
| float mxvk::Camera::viewport_center_y = 0.0f |
Viewport center Y coordinate.
Definition at line 1756 of file mxvk_math.h.
| float mxvk::Camera::viewport_height = 1.0f |
Viewport height in pixels.
Definition at line 1750 of file mxvk_math.h.
| float mxvk::Camera::viewport_width = 1.0f |
Viewport width in pixels.
Definition at line 1747 of file mxvk_math.h.