Evospace  0.19.0
Modding API
 
Loading...
Searching...
No Matches
Transform Class Reference

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
 

Detailed Description

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.

Member Function Documentation

◆ get_forward_vector()

vec3 Transform::get_forward_vector ( ) const

Get the forward vector of the transform.

Returns
Vec3 representing the forward direction of the transform.

◆ get_location()

vec3 Transform::get_location ( ) const

Get the location (translation) of the transform.

Returns
Vec3 representing the location of the transform.

◆ get_right_vector()

vec3 Transform::get_right_vector ( ) const

Get the right vector of the transform.

Returns
Vec3 representing the right direction of the transform.

◆ get_rotation()

Quat Transform::get_rotation ( ) const

Get the rotation (orientation) of the transform.

Returns
Quat representing the rotation of the transform as a quaternion.

◆ get_scale3_d()

vec3 Transform::get_scale3_d ( ) const

Get the scale of the transform.

Returns
Vec3 representing the scale of the transform.

◆ get_up_vector()

vec3 Transform::get_up_vector ( ) const

Get the up vector of the transform.

Returns
Vec3 representing the up direction of the transform.

◆ inverse_transform_position()

vec3 Transform::inverse_transform_position ( const vec3 & position) const

Inverse transform a position vector by this transform.

Parameters
PositionThe position vector to inverse transform.
Returns
Vec3 representing the inverse transformed position.

◆ set_location()

void Transform::set_location ( const vec3 & location)

Set the location (translation) of the transform.

Parameters
LocationVec3 representing the new location.

◆ set_rotation()

void Transform::set_rotation ( const Quat & rotation)

Set the rotation (orientation) of the transform.

Parameters
RotationQuat representing the new rotation as a quaternion.

◆ set_scale3_d()

void Transform::set_scale3_d ( const vec3 & scale)

Set the scale of the transform.

Parameters
ScaleVec3 representing the new scale.

◆ transform_position()

vec3 Transform::transform_position ( const vec3 & position) const

Transform a position vector by this transform.

Parameters
PositionThe position vector to transform.
Returns
Vec3 representing the transformed position.

Member Data Documentation

◆ rotation

Quat Transform::rotation

rotation (orientation) component of the transform as a quaternion

Definition at line 105 of file MathDoxy.h.

◆ scale

vec3 Transform::scale

scale component of the transform

Definition at line 107 of file MathDoxy.h.

◆ translation

vec3 Transform::translation

translation (position) component of the transform

Definition at line 104 of file MathDoxy.h.