![]() |
Divide Framework 0.1
A free and open-source 3D Framework under heavy development
|
#include <Transform.h>
Public Member Functions | |
Transform () noexcept=default | |
Transform (const Quaternion< F32 > &orientation, const vec3< F32 > &translation, const vec3< F32 > &scale) noexcept | |
void | setPosition (const vec3< F32 > &position) noexcept override |
Set the local X,Y and Z position. | |
void | setPosition (F32 x, F32 y, F32 z) noexcept override |
Set the local X,Y and Z position. | |
void | setPositionX (F32 positionX) noexcept override |
Set the object's position on the X axis. | |
void | setPositionY (F32 positionY) noexcept override |
Set the object's position on the Y axis. | |
void | setPositionZ (F32 positionZ) noexcept override |
Set the object's position on the Z axis. | |
void | translate (const vec3< F32 > &axisFactors) noexcept override |
Add the specified translation factors to the current local position. | |
void | setScale (const vec3< F32 > &amount) noexcept override |
Set the local X,Y and Z amount factors. | |
void | setScaleX (F32 amount) noexcept override |
Set the scaling factor on the X axis. | |
void | setScaleY (F32 amount) noexcept override |
Set the scaling factor on the Y axis. | |
void | setScaleZ (F32 amount) noexcept override |
Set the scaling factor on the Z axis. | |
void | scale (const vec3< F32 > &axisFactors) noexcept override |
Add the specified scale factors to the current local position. | |
void | scaleX (F32 amount) noexcept override |
Increase the scaling factor on the X axis by the specified factor. | |
void | scaleY (F32 amount) noexcept override |
Increase the scaling factor on the Y axis by the specified factor. | |
void | scaleZ (F32 amount) noexcept override |
Increase the scaling factor on the Z axis by the specified factor. | |
void | setRotation (const vec3< F32 > &axis, Angle::DEGREES< F32 > degrees) noexcept override |
void | setRotation (Angle::DEGREES< F32 > pitch, Angle::DEGREES< F32 > yaw, Angle::DEGREES< F32 > roll) noexcept override |
void | setRotation (const Quaternion< F32 > &quat) noexcept override |
Set the local orientation so that it matches the specified quaternion. | |
void | setRotationX (Angle::DEGREES< F32 > angle) noexcept override |
void | setRotationY (Angle::DEGREES< F32 > angle) noexcept override |
void | setRotationZ (Angle::DEGREES< F32 > angle) noexcept override |
void | rotate (const vec3< F32 > &axis, Angle::DEGREES< F32 > degrees) noexcept override |
void | rotate (Angle::DEGREES< F32 > pitch, Angle::DEGREES< F32 > yaw, Angle::DEGREES< F32 > roll) noexcept override |
void | rotate (const Quaternion< F32 > &quat) noexcept override |
Apply the specified Quaternion rotation starting from the current orientation. | |
void | rotateSlerp (const Quaternion< F32 > &quat, D64 deltaTime) override |
Perform a SLERP rotation towards the specified quaternion. | |
void | rotateX (Angle::DEGREES< F32 > angle) noexcept override |
void | rotateY (Angle::DEGREES< F32 > angle) noexcept override |
void | rotateZ (Angle::DEGREES< F32 > angle) noexcept override |
void | getScale (vec3< F32 > &scaleOut) const noexcept override |
Return the scale factor. | |
void | getPosition (vec3< F32 > &posOut) const noexcept override |
Return the position. | |
void | getOrientation (Quaternion< F32 > &quatOut) const noexcept override |
Return the orientation quaternion. | |
bool | isUniformScale (const F32 tolerance=EPSILON_F32) const noexcept |
void | setTransforms (const mat4< F32 > &transform) |
void | clone (const Transform *transform) noexcept |
Set all of the internal values to match those of the specified transform. | |
void | setValues (const TransformValues &values) noexcept |
Set position, scale and rotation based on the specified transform values. | |
bool | operator== (const Transform &other) const |
Compares 2 transforms. | |
bool | operator!= (const Transform &other) const |
void | identity () noexcept |
Reset transform to identity. | |
![]() | |
virtual | ~ITransform ()=default |
virtual void | setPosition (const vec3< F32 > &position)=0 |
Set the local X,Y and Z position. | |
virtual void | setPosition (F32 x, F32 y, F32 z)=0 |
Set the local X,Y and Z position. | |
virtual void | setPositionX (F32 positionX)=0 |
Set the object's position on the X axis. | |
virtual void | setPositionY (F32 positionY)=0 |
Set the object's position on the Y axis. | |
virtual void | setPositionZ (F32 positionZ)=0 |
Set the object's position on the Z axis. | |
virtual void | translate (const vec3< F32 > &axisFactors)=0 |
Add the specified translation factors to the current local position. | |
virtual void | setScale (const vec3< F32 > &amount)=0 |
Set the local X,Y and Z scale factors. | |
virtual void | setScaleX (F32 amount)=0 |
Set the scaling factor on the X axis. | |
virtual void | setScaleY (F32 amount)=0 |
Set the scaling factor on the Y axis. | |
virtual void | setScaleZ (F32 amount)=0 |
Set the scaling factor on the Z axis. | |
virtual void | scale (const vec3< F32 > &axisFactors)=0 |
Add the specified scale factors to the current local position. | |
virtual void | scaleX (F32 amount)=0 |
Increase the scaling factor on the X axis by the specified factor. | |
virtual void | scaleY (F32 amount)=0 |
Increase the scaling factor on the Y axis by the specified factor. | |
virtual void | scaleZ (F32 amount)=0 |
Increase the scaling factor on the Z axis by the specified factor. | |
virtual void | setRotation (const vec3< F32 > &axis, Angle::DEGREES< F32 > degrees)=0 |
virtual void | setRotation (Angle::DEGREES< F32 > pitch, Angle::DEGREES< F32 > yaw, Angle::DEGREES< F32 > roll)=0 |
virtual void | setRotation (const Quaternion< F32 > &quat)=0 |
Set the local orientation so that it matches the specified quaternion. | |
virtual void | setRotationX (Angle::DEGREES< F32 > angle)=0 |
virtual void | setRotationY (Angle::DEGREES< F32 > angle)=0 |
virtual void | setRotationZ (Angle::DEGREES< F32 > angle)=0 |
virtual void | rotate (const vec3< F32 > &axis, Angle::DEGREES< F32 > degrees)=0 |
virtual void | rotate (Angle::DEGREES< F32 > pitch, Angle::DEGREES< F32 > yaw, Angle::DEGREES< F32 > roll)=0 |
virtual void | rotate (const Quaternion< F32 > &quat)=0 |
Apply the specified Quaternion rotation starting from the current orientation. | |
virtual void | rotateSlerp (const Quaternion< F32 > &quat, D64 deltaTime)=0 |
Perform a SLERP rotation towards the specified quaternion. | |
virtual void | rotateX (Angle::DEGREES< F32 > angle)=0 |
Rotate on the X axis (Axis-Angle used) by the specified angle (either degrees or radians) | |
virtual void | rotateY (Angle::DEGREES< F32 > angle)=0 |
Rotate on the Y axis (Axis-Angle used) by the specified angle (either degrees or radians) | |
virtual void | rotateZ (Angle::DEGREES< F32 > angle)=0 |
Rotate on the Z axis (Axis-Angle used) by the specified angle (either degrees or radians) | |
void | setScale (F32 amount) |
Set an uniform scale on all three axis. | |
void | setScale (F32 x, F32 y, F32 z) |
Set a scaling factor for each axis. | |
void | setRotationEuler (const vec3< F32 > &euler) |
Set the euler rotation in degrees. | |
void | translate (F32 x, F32 y, F32 z) |
Translate the object on each axis by the specified amount. | |
void | translateX (F32 positionX) |
Translate the object on the X axis by the specified amount. | |
void | translateY (F32 positionY) |
Translate the object on the Y axis by the specified amount. | |
void | translateZ (F32 positionZ) |
Translate the object on the Z axis by the specified amount. | |
void | scale (F32 amount) |
Increase the scaling factor on all three axis by an uniform factor. | |
void | scale (F32 x, F32 y, F32 z) |
Increase the scaling factor on all three axis by the specified amounts. | |
void | rotate (F32 xAxis, F32 yAxis, F32 zAxis, Angle::DEGREES< F32 > degrees) |
Apply an axis-angle rotation. | |
void | rotate (const vec3< F32 > &euler) |
Apply an euler rotation. | |
virtual void | getScale (vec3< F32 > &scaleOut) const =0 |
Return the scale factor. | |
virtual void | getPosition (vec3< F32 > &posOut) const =0 |
Return the position. | |
virtual void | getOrientation (Quaternion< F32 > &quatOut) const =0 |
Return the orientation quaternion. | |
![]() | |
GUIDWrapper () noexcept | |
GUIDWrapper (const GUIDWrapper &old) noexcept | |
GUIDWrapper (GUIDWrapper &&old) noexcept | |
virtual | ~GUIDWrapper ()=default |
FORCE_INLINE I64 | getGUID () const noexcept |
GUIDWrapper & | operator= (const GUIDWrapper &old)=delete |
GUIDWrapper & | operator= (GUIDWrapper &&other)=delete |
Additional Inherited Members | |
![]() | |
static I64 | generateGUID () noexcept |
![]() | |
Quaternion< F32 > | _orientation {} |
vec3< F32 > | _translation { VECTOR3_ZERO } |
The object's position in the world as a 3 component vector. | |
vec3< F32 > | _scale { VECTOR3_UNIT } |
![]() | |
const I64 | _guid |
![]() | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
NonCopyable (NonCopyable &&)=default | |
NonCopyable & | operator= (NonCopyable &&)=default |
NonCopyable ()=default | |
~NonCopyable ()=default | |
Definition at line 41 of file Transform.h.
|
defaultnoexcept |
|
explicitnoexcept |
Definition at line 7 of file Transform.cpp.
|
inlinenoexcept |
Set all of the internal values to match those of the specified transform.
Definition at line 195 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Return the orientation quaternion.
Implements Divide::ITransform.
Definition at line 187 of file Transform.inl.
Return the scale factor.
Implements Divide::ITransform.
Definition at line 177 of file Transform.inl.
|
noexcept |
Reset transform to identity.
Definition at line 21 of file Transform.cpp.
|
inlinenoexcept |
Definition at line 191 of file Transform.inl.
FORCE_INLINE bool Divide::Transform::operator!= | ( | const Transform & | other | ) | const |
Definition at line 211 of file Transform.inl.
FORCE_INLINE bool Divide::Transform::operator== | ( | const Transform & | other | ) | const |
Compares 2 transforms.
Definition at line 207 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Apply the specified Euler rotation starting from the current orientation. The angles can be in either degrees(default) or radians
Implements Divide::ITransform.
Definition at line 105 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Apply the specified Quaternion rotation starting from the current orientation.
Implements Divide::ITransform.
Definition at line 110 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Apply the specified Axis-Angle rotation starting from the current orientation. The angles can be in either degrees(default) or radians
Implements Divide::ITransform.
Definition at line 98 of file Transform.inl.
|
inlineoverridevirtual |
Perform a SLERP rotation towards the specified quaternion.
Implements Divide::ITransform.
Definition at line 115 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Rotate on the X axis (Axis-Angle used) by the specified angle (either degrees or radians)
Implements Divide::ITransform.
Definition at line 147 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Rotate on the Y axis (Axis-Angle used) by the specified angle (either degrees or radians)
Implements Divide::ITransform.
Definition at line 152 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Rotate on the Z axis (Axis-Angle used) by the specified angle (either degrees or radians)
Implements Divide::ITransform.
Definition at line 157 of file Transform.inl.
Add the specified scale factors to the current local position.
Implements Divide::ITransform.
Definition at line 91 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Increase the scaling factor on the X axis by the specified factor.
Implements Divide::ITransform.
Definition at line 134 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Increase the scaling factor on the Y axis by the specified factor.
Implements Divide::ITransform.
Definition at line 138 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Increase the scaling factor on the Z axis by the specified factor.
Implements Divide::ITransform.
Definition at line 142 of file Transform.inl.
Set the local X,Y and Z position.
Implements Divide::ITransform.
Definition at line 38 of file Transform.inl.
Set the local X,Y and Z position.
Implements Divide::ITransform.
Definition at line 43 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Set the object's position on the X axis.
Implements Divide::ITransform.
Definition at line 48 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Set the object's position on the Y axis.
Implements Divide::ITransform.
Definition at line 52 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Set the object's position on the Z axis.
Implements Divide::ITransform.
Definition at line 57 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Set the local orientation using the Euler system. The angles can be in either degrees(default) or radians
Implements Divide::ITransform.
Definition at line 75 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Set the local orientation so that it matches the specified quaternion.
Implements Divide::ITransform.
Definition at line 80 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Set the local orientation using the Axis-Angle system. The angle can be in either degrees(default) or radians
Implements Divide::ITransform.
Definition at line 68 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Set the rotation on the X axis (Axis-Angle used) by the specified angle (either degrees or radians)
Implements Divide::ITransform.
Definition at line 162 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Set the rotation on the Y axis (Axis-Angle used) by the specified angle (either degrees or radians)
Implements Divide::ITransform.
Definition at line 167 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Set the rotation on the Z axis (Axis-Angle used) by the specified angle (either degrees or radians)
Implements Divide::ITransform.
Definition at line 172 of file Transform.inl.
Set the local X,Y and Z amount factors.
Implements Divide::ITransform.
Definition at line 62 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Set the scaling factor on the X axis.
Implements Divide::ITransform.
Definition at line 121 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Set the scaling factor on the Y axis.
Implements Divide::ITransform.
Definition at line 125 of file Transform.inl.
|
inlineoverridevirtualnoexcept |
Set the scaling factor on the Z axis.
Implements Divide::ITransform.
Definition at line 129 of file Transform.inl.
Sets the transform to match a certain transformation matrix. Scale, orientation and translation are extracted from the specified matrix
Definition at line 14 of file Transform.cpp.
|
inlinenoexcept |
Set position, scale and rotation based on the specified transform values.
Definition at line 200 of file Transform.inl.
Add the specified translation factors to the current local position.
Implements Divide::ITransform.
Definition at line 86 of file Transform.inl.