Support Forum       G3D Web Page     
Public Member Functions | Public Attributes | List of all members
G3D::PhysicsFrame Class Reference

An RT transformation using a quaternion; suitable for physics integration. More...

Public Member Functions

 PhysicsFrame ()
 
Initializes to the identity frame. More...
 
 PhysicsFrame (const Vector3 &translation)
 
Purely translational. More...
 
 PhysicsFrame (const Quat &rot, const Vector3 &translation)
 
 PhysicsFrame (const Matrix3 &rot, const Vector3 &translation)
 
 PhysicsFrame (const Matrix3 &rot)
 
 PhysicsFrame (const CoordinateFrame &coordinateFrame)
 
 PhysicsFrame (const class Any &any)
 
virtual ~PhysicsFrame ()
 
void deserialize (class BinaryInput &b)
 
PhysicsFrame lerp (const PhysicsFrame &other, float alpha) const
 
Linear interpolation (spherical linear for the rotations). More...
 
 operator CFrame () const
 
bool operator!= (const PhysicsFrame &other) const
 
PhysicsFrame operator* (const PhysicsFrame &other) const
 Compose: create the transformation that is other followed by this. More...
 
PhysicsFrame operator* (float f) const
 Multiplies both pieces by f; note that this will result in a non-unit quaternion that needs to be normalized. More...
 
PhysicsFrameoperator*= (float f)
 Multiplies both pieces by f; note that this will result in a non-unit quaternion that needs to be normalized. More...
 
PhysicsFrame operator+ (const PhysicsFrame &f) const
 
PhysicsFrameoperator+= (const PhysicsFrame &f)
 
PhysicsFrameoperator= (const PhysicsFrame &p)
 
bool operator== (const PhysicsFrame &other) const
 
void serialize (class BinaryOutput &b) const
 
Any toAny () const
 

Public Attributes

Quat rotation
 
Point3 translation
 
Origin of this reference frame in its parent's frame. More...
 

Detailed Description

An RT transformation using a quaternion; suitable for physics integration.

This interface is in "Beta" and will change in the next release.

Constructor & Destructor Documentation

◆ PhysicsFrame() [1/7]

G3D::PhysicsFrame::PhysicsFrame ( )


Initializes to the identity frame.

Referenced by operator*(), and operator+().

◆ PhysicsFrame() [2/7]

G3D::PhysicsFrame::PhysicsFrame ( const Vector3 translation)
inline


Purely translational.

◆ PhysicsFrame() [3/7]

G3D::PhysicsFrame::PhysicsFrame ( const Quat rot,
const Vector3 translation 
)
inline

◆ PhysicsFrame() [4/7]

G3D::PhysicsFrame::PhysicsFrame ( const Matrix3 rot,
const Vector3 translation 
)
inline

◆ PhysicsFrame() [5/7]

G3D::PhysicsFrame::PhysicsFrame ( const Matrix3 rot)
inline

◆ PhysicsFrame() [6/7]

G3D::PhysicsFrame::PhysicsFrame ( const CoordinateFrame coordinateFrame)

◆ PhysicsFrame() [7/7]

G3D::PhysicsFrame::PhysicsFrame ( const class Any any)

◆ ~PhysicsFrame()

virtual G3D::PhysicsFrame::~PhysicsFrame ( )
inlinevirtual

Member Function Documentation

◆ deserialize()

void G3D::PhysicsFrame::deserialize ( class BinaryInput b)

◆ lerp()

PhysicsFrame G3D::PhysicsFrame::lerp ( const PhysicsFrame other,
float  alpha 
) const


Linear interpolation (spherical linear for the rotations).

◆ operator CFrame()

G3D::PhysicsFrame::operator CFrame ( ) const

◆ operator!=()

bool G3D::PhysicsFrame::operator!= ( const PhysicsFrame other) const
inline

◆ operator*() [1/2]

PhysicsFrame G3D::PhysicsFrame::operator* ( const PhysicsFrame other) const

Compose: create the transformation that is other followed by this.

◆ operator*() [2/2]

PhysicsFrame G3D::PhysicsFrame::operator* ( float  f) const
inline

Multiplies both pieces by f; note that this will result in a non-unit quaternion that needs to be normalized.

◆ operator*=()

PhysicsFrame& G3D::PhysicsFrame::operator*= ( float  f)
inline

Multiplies both pieces by f; note that this will result in a non-unit quaternion that needs to be normalized.

◆ operator+()

PhysicsFrame G3D::PhysicsFrame::operator+ ( const PhysicsFrame f) const
inline

◆ operator+=()

PhysicsFrame& G3D::PhysicsFrame::operator+= ( const PhysicsFrame f)
inline

◆ operator=()

PhysicsFrame& G3D::PhysicsFrame::operator= ( const PhysicsFrame p)
inline

◆ operator==()

bool G3D::PhysicsFrame::operator== ( const PhysicsFrame other) const
inline

◆ serialize()

void G3D::PhysicsFrame::serialize ( class BinaryOutput b) const

◆ toAny()

Any G3D::PhysicsFrame::toAny ( ) const

Member Data Documentation

◆ rotation

Quat G3D::PhysicsFrame::rotation

◆ translation

Point3 G3D::PhysicsFrame::translation


Origin of this reference frame in its parent's frame.

Referenced by operator*(), operator*=(), operator+(), operator+=(), operator=(), and operator==().


documentation generated on Wed Nov 24 2021 08:01:59 using doxygen 1.8.15