ReactPhysics3D  v0.10.2
C++ Physics engine library
Loading...
Searching...
No Matches
reactphysics3d::Transform Class Reference

This class represents a position and an orientation in 3D. More...

#include <include/reactphysics3d/mathematics/Transform.h>

Public Member Functions

 Transform ()
 Constructor.
 
 Transform (const Vector3 &position, const Matrix3x3 &orientation)
 Constructor.
 
 Transform (const Vector3 &position, const Quaternion &orientation)
 Constructor.
 
const Vector3getPosition () const
 Return the origin of the transform.
 
void setPosition (const Vector3 &position)
 Set the origin of the transform.
 
const QuaterniongetOrientation () const
 Return the orientation quaternion.
 
void setOrientation (const Quaternion &orientation)
 Set the rotation quaternion.
 
void setToIdentity ()
 Set the transform to the identity transform.
 
void setFromOpenGL (decimal *openglMatrix)
 Set the transform from an OpenGL transform matrix.
 
void getOpenGLMatrix (decimal *openglMatrix) const
 Get the OpenGL matrix of the transform.
 
Transform getInverse () const
 Return the inverse of the transform.
 
bool isValid () const
 Return true if it is a valid transform.
 
Vector3 operator* (const Vector3 &vector) const
 Return the transformed vector.
 
Transform operator* (const Transform &transform2) const
 Operator of multiplication of a transform with another one.
 
bool operator== (const Transform &transform2) const
 Return true if the two transforms are equal.
 
bool operator!= (const Transform &transform2) const
 Return true if the two transforms are different.
 
std::string to_string () const
 Return the string representation.
 

Static Public Member Functions

static Transform interpolateTransforms (const Transform &oldTransform, const Transform &newTransform, decimal interpolationFactor)
 Return an interpolated transform.
 
static Transform identity ()
 Return the identity transform.
 

Detailed Description

This class represents a position and an orientation in 3D.

It can also be seen as representing a translation and a rotation.


The documentation for this class was generated from the following files: