Creates a look-at matrix for positioning a camera in 3D space.
This function generates a view matrix that can be used to position a camera looking at a specific target point from a given eye position, with an up vector to define the camera's vertical orientation.
- Template Parameters
-
P | The precision level for calculations, defaulting to Standard. |
- Parameters
-
eye | The position of the camera in world coordinates. |
target | The point in world space that the camera is looking at. |
up | The up vector, which defines the camera's vertical direction (default is Vector3D::UnitY()). |
- Returns
- A Matrix43 representing the look-at transformation.
- Note
- This function assumes that the up vector is not collinear with the look vector.
);
constexpr Matrix43()
Default constructor initializing to a zero matrix.
Definition mat43.hpp:85
static constexpr Matrix43 CreateLookAt(const Vector3D &eye, const Vector3D &target, const Vector3D &up=Vector3D::UnitY())
Creates a look-at matrix for positioning a camera in 3D space.
Definition mat43.hpp:431
static consteval Vector3D UnitY()
Get a unit vector pointing along the Y axis (0,1,0).
Definition vector3d.hpp:664
A high-performance three-dimensional vector implementation optimized for Saturn hardware.
Definition vector3d.hpp:51
This function is used to create a view matrix that can be used to position a camera in 3D space. The resulting matrix can be used to transform points from world space to the camera's local space.