Represents a 3D transformation, including translation, rotation, and scale. More...
Public Member Functions | |
vec3 | get_forward_vector () const |
Get the forward vector of the transform. | |
vec3 | get_right_vector () const |
Get the right vector of the transform. | |
vec3 | get_up_vector () const |
Get the up vector of the transform. | |
vec3 | transform_position (const vec3 &position) const |
Transform a position vector by this transform. | |
vec3 | inverse_transform_position (const vec3 &position) const |
Inverse transform a position vector by this transform. | |
void | set_location (const vec3 &location) |
Set the location (translation) of the transform. | |
void | set_rotation (const Quat &rotation) |
Set the rotation (orientation) of the transform. | |
void | set_scale3_d (const vec3 &scale) |
Set the scale of the transform. | |
vec3 | get_location () const |
Get the location (translation) of the transform. | |
Quat | get_rotation () const |
Get the rotation (orientation) of the transform. | |
vec3 | get_scale3_d () const |
Get the scale of the transform. | |
Public Attributes | |
vec3 | translation |
Quat | rotation |
vec3 | scale |
Represents a 3D transformation, including translation, rotation, and scale.
Transform is a class that stores a 3D transformation, including translation (position), rotation (orientation), and scale. It provides various operations to manipulate and transform objects in 3D space.
Definition at line 101 of file MathDoxy.h.
vec3 Transform::get_forward_vector | ( | ) | const |
Get the forward vector of the transform.
vec3 Transform::get_location | ( | ) | const |
Get the location (translation) of the transform.
vec3 Transform::get_right_vector | ( | ) | const |
Get the right vector of the transform.
Quat Transform::get_rotation | ( | ) | const |
Get the rotation (orientation) of the transform.
vec3 Transform::get_scale3_d | ( | ) | const |
Get the scale of the transform.
vec3 Transform::get_up_vector | ( | ) | const |
Get the up vector of the transform.
Inverse transform a position vector by this transform.
Position | The position vector to inverse transform. |
void Transform::set_location | ( | const vec3 & | location | ) |
Set the location (translation) of the transform.
Location | Vec3 representing the new location. |
void Transform::set_rotation | ( | const Quat & | rotation | ) |
Set the rotation (orientation) of the transform.
Rotation | Quat representing the new rotation as a quaternion. |
void Transform::set_scale3_d | ( | const vec3 & | scale | ) |
Set the scale of the transform.
Scale | Vec3 representing the new scale. |
Transform a position vector by this transform.
Position | The position vector to transform. |
Quat Transform::rotation |
rotation (orientation) component of the transform as a quaternion
Definition at line 105 of file MathDoxy.h.
vec3 Transform::scale |
scale component of the transform
Definition at line 107 of file MathDoxy.h.
vec3 Transform::translation |
translation (position) component of the transform
Definition at line 104 of file MathDoxy.h.