AGX Dynamics 2.40.1.1
Loading...
Searching...
No Matches
agx::Frame Class Reference

The object defining a frame of reference and providing transformations operations. More...

#include <Frame.h>

+ Inheritance diagram for agx::Frame:

Public Member Functions

 Frame ()
 Default constructor.
 
 Frame (const agx::AffineMatrix4x4 matrix)
 Instantiate a frame with relative transformation matrix.
 
 Frame (const agx::Frame &frame)
 Copy constructor.
 
 Frame (const agxData::AttributePtr< AffineMatrix4x4 > &localTransform, const agxData::AttributePtr< AffineMatrix4x4 > &globalTransform)
 Frame with existing matrix storage.
 
 AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agx::Frame)
 
bool allowTransferDataIntoChildren () const
 
const agx::AffineMatrix4x4getLocalMatrix () const
 
Quat getLocalRotate () const
 
agx::Vec3 getLocalTranslate () const
 
const agx::AffineMatrix4x4getMatrix () const
 
agx::FramegetParent ()
 
const agx::FramegetParent () const
 
agx::RigidBodygetRigidBody ()
 
const agx::RigidBodygetRigidBody () const
 
agx::Quat getRotate () const
 
agx::Vec3 getTranslate () const
 
bool hasChildren () const
 
bool hasParent () const
 
bool isFinite () const
 
Frameoperator= (const agx::Frame &frame)
 Assignment operator.
 
void removeAllChildren ()
 Remove all children of this frame.
 
bool removeChild (agx::Frame *frame)
 Remove a specified frame from the list of children.
 
void setAllowTransferIntoChildren (bool allow)
 Specifies whether a transferDataIntoLeaves() operation will go into this frames children (including any attached bodies) and concatenating transformations.
 
void setEntityData (agxData::AttributePtr< agx::AffineMatrix4x4 > localTransform, agxData::AttributePtr< agx::AffineMatrix4x4 > globalTransform)
 Assign entity data.
 
void setLocalMatrix (const agx::AffineMatrix4x4 &matrix)
 Assign the local transformation matrix for this frame ignoring any eventual parent transformation.
 
void setLocalRotate (const agx::EulerAngles &rotation)
 Assign the parent relative rotation of this frame.
 
void setLocalRotate (const agx::Quat &rotation)
 Assign the parent relative rotation of this frame.
 
void setLocalTranslate (agx::Real x, agx::Real y, agx::Real z)
 Assign the parent relative translate of this frame.
 
void setLocalTranslate (const agx::Vec3 &translate)
 Assign the parent relative translate of this frame.
 
void setMatrix (const agx::AffineMatrix4x4 &matrix)
 This method will set the local matrix of this frame to be the matrix m multiplied with the inverse of the parents matrix: M = m * inv(parent) I.e., assign the final (world) transform of this frame.
 
void setMatrixPointers (const agxData::AttributePtr< agx::AffineMatrix4x4 > &localTransform, const agxData::AttributePtr< agx::AffineMatrix4x4 > &globalTransform)
 Internal method.
 
bool setParent (agx::Frame *frame)
 Set the parent of this Frame.
 
void setRotate (const agx::EulerAngles &euler)
 Assign the final (world) rotation of this frame.
 
void setRotate (const agx::OrthoMatrix3x3 &rotation)
 Assign the final (world) rotation of this frame.
 
void setRotate (const agx::Quat &rotation)
 Assign the final (world) rotation of this frame.
 
void setTranslate (agx::Real x, agx::Real y, agx::Real z)
 Assign the final (world) translate of this frame.
 
void setTranslate (const agx::Vec3 &translate)
 Assign the final (world) translate of this frame.
 
void transferChildren (agx::Frame *newParent)
 Move all the frame children of this frame to the new parent while retaining the original global transformation.
 
void transferDataIntoLeaves (bool keepLocalVelocity=true, bool clearTransform=true)
 This method takes the transformation stored in this frame, and concatenates it to all of its children.
 
agx::Vec3 transformPointToLocal (agx::Real px, agx::Real py, agx::Real pz) const
 Transform point from the world coordinate frame to this frame.
 
agx::Vec3 transformPointToLocal (const agx::Vec3 &pointWorld) const
 Transform point from the world coordinate frame to this frame.
 
agx::Vec3transformPointToLocal (const agx::Vec3 &pointWorld, agx::Vec3 &pointLocal) const
 Transform point from the world coordinate frame to this frame.
 
agx::Vec3 transformPointToWorld (agx::Real px, agx::Real py, agx::Real pz) const
 Transform point from this frame to the world frame.
 
agx::Vec3transformPointToWorld (const agx::Vec3 &localPoint, agx::Vec3 &worldPoint) const
 Transform point from this frame to the world frame.
 
agx::Vec3 transformPointToWorld (const agx::Vec3 &pointLocal) const
 Transform point from this frame to the world frame.
 
agx::Vec3 transformVectorToLocal (agx::Real vx, agx::Real vy, agx::Real vz) const
 Transform vector from the world coordinate frame to this frame.
 
agx::Vec3transformVectorToLocal (const agx::Vec3 &vectorWorld, agx::Vec3 &vectorLocal) const
 Transform vector from the world coordinate frame to this frame.
 
agx::Vec3 transformVectorToLocal (const agx::Vec3 &worldVector) const
 Transform vector from the world coordinate frame to this frame.
 
agx::Vec3 transformVectorToWorld (agx::Real vx, agx::Real vy, agx::Real vz) const
 Transform vector from this frame to the world frame.
 
agx::Vec3transformVectorToWorld (const agx::Vec3 &localVector, agx::Vec3 &worldVector) const
 Transform vector from this frame to the world frame.
 
agx::Vec3 transformVectorToWorld (const agx::Vec3 &vectorLocal) const
 Transform vector from this frame to the world frame.
 
void updateLocalMatrix ()
 Internal method.
 
void updateLocalMatrixSSE ()
 Internal method.
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referencedoperator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings.
 
virtual const char * getClassName () const
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object.
 
virtual StorageAgent * getStorageAgent () const =0
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object.
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object.
 

Static Public Member Functions

static agxStream::Serializablecreate (agxStream::InputArchive &)
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
 

Protected Member Functions

virtual ~Frame ()
 Protected destructor - reference counted object.
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor.
 
 Serializable (const Serializable &other)
 Copy constructor.
 
void generateUuid ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandlergetDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

The object defining a frame of reference and providing transformations operations.

A frame can have a parent. If so, localToWorld transformation is the concatenation of this frames transformation with the parents.

A frame can convert vectors and points into its parents coordinate system.

A frame of reference can be kinematic in which case the velocity and angular velocities are important objects.

A frame can internally be set to static, which means that getVelocity will always return zero.

Definition at line 67 of file agx/Frame.h.

Constructor & Destructor Documentation

◆ Frame() [1/4]

agx::Frame::Frame ( )

Default constructor.

◆ Frame() [2/4]

agx::Frame::Frame ( const agxData::AttributePtr< AffineMatrix4x4 > &  localTransform,
const agxData::AttributePtr< AffineMatrix4x4 > &  globalTransform 
)

Frame with existing matrix storage.

◆ Frame() [3/4]

agx::Frame::Frame ( const agx::AffineMatrix4x4  matrix)
explicit

Instantiate a frame with relative transformation matrix.

Parameters
matrix- transformation matrix that will be this frame's local matrix

◆ Frame() [4/4]

agx::Frame::Frame ( const agx::Frame frame)

Copy constructor.

Parameters
frame- other frame

◆ ~Frame()

virtual agx::Frame::~Frame ( )
protectedvirtual

Protected destructor - reference counted object.

Member Function Documentation

◆ AGXSTREAM_DECLARE_SERIALIZABLE_BASE()

agx::Frame::AGXSTREAM_DECLARE_SERIALIZABLE_BASE ( agx::Frame  )

◆ allowTransferDataIntoChildren()

bool agx::Frame::allowTransferDataIntoChildren ( ) const
Returns
true if transferDataIntoLeaves() is allowed to traverse below this frame

Definition at line 645 of file agx/Frame.h.

◆ create()

static agxStream::Serializable * agx::Frame::create ( agxStream::InputArchive )
inlinestatic

Definition at line 432 of file agx/Frame.h.

◆ getLocalMatrix()

const AffineMatrix4x4 & agx::Frame::getLocalMatrix ( ) const
Returns
the local transformation matrix (i.e., the transformation relative to the parent)

Definition at line 521 of file agx/Frame.h.

◆ getLocalRotate()

Quat agx::Frame::getLocalRotate ( ) const
Returns
the relative rotation to this frame's parent frame

◆ getLocalTranslate()

Vec3 agx::Frame::getLocalTranslate ( ) const
Returns
the relative translate to this frame's parent frame

Definition at line 552 of file agx/Frame.h.

◆ getMatrix()

const agx::AffineMatrix4x4 & agx::Frame::getMatrix ( ) const
Returns
the transformation matrix for this frame including parents coordinate frames (this frame's final (world) transform)

Referenced by getTranslate(), setMatrix(), setTranslate(), transformPointToLocal(), transformPointToWorld(), transformVectorToLocal(), and transformVectorToWorld().

◆ getParent() [1/2]

Frame * agx::Frame::getParent ( )
Returns
a pointer to the parent frame, 0 if this frame has no parent

Definition at line 506 of file agx/Frame.h.

Referenced by setMatrix(), and setTranslate().

◆ getParent() [2/2]

const Frame * agx::Frame::getParent ( ) const
Returns
a pointer to the parent frame, 0 if this frame has no parent

Definition at line 511 of file agx/Frame.h.

◆ getRigidBody() [1/2]

agx::RigidBody * agx::Frame::getRigidBody ( )
Returns
the rigid body that is direct associated to this frame, 0 if none

◆ getRigidBody() [2/2]

const agx::RigidBody * agx::Frame::getRigidBody ( ) const
Returns
the rigid body that is direct associated to this frame, 0 if none

◆ getRotate()

agx::Quat agx::Frame::getRotate ( ) const
Returns
the rotation of this frame in final (world) coordinate frame

◆ getTranslate()

Vec3 agx::Frame::getTranslate ( ) const
Returns
the translate of this frame in final (world) coordinate frame

Definition at line 532 of file agx/Frame.h.

References getMatrix(), and agx::Matrix4x4T< T >::getTranslate().

◆ hasChildren()

bool agx::Frame::hasChildren ( ) const
Returns
true if this frame has children

Definition at line 655 of file agx/Frame.h.

References agx::SetVector< DataT, HashT >::empty().

◆ hasParent()

bool agx::Frame::hasParent ( ) const
Returns
true if this frame has a parent - otherwise false

Definition at line 516 of file agx/Frame.h.

◆ isFinite()

bool agx::Frame::isFinite ( ) const
Returns
true iff all parts of this frame are finite values (no inf:s, no NaN:s)

◆ operator=()

Frame & agx::Frame::operator= ( const agx::Frame frame)

Assignment operator.

Parameters
frame- other frame

◆ removeAllChildren()

void agx::Frame::removeAllChildren ( )

Remove all children of this frame.

◆ removeChild()

bool agx::Frame::removeChild ( agx::Frame frame)

Remove a specified frame from the list of children.

Parameters
frame- the child frame to remove
Returns
true if removal was successful, false if frame wasn't found

◆ setAllowTransferIntoChildren()

void agx::Frame::setAllowTransferIntoChildren ( bool  allow)

Specifies whether a transferDataIntoLeaves() operation will go into this frames children (including any attached bodies) and concatenating transformations.

Frames are usually setup in a hierarchy, a root->transferDataIntoLeaves() will take the transformation from the root concatenate transformation on the way down to the leave, where the transformation will be stored, in a body, or a leaf frame. If you call child->setAllowTransferDataIntoChildren( false ); the concatenated transformation will stop at the child, leaving its children untouched.

Parameters
allow- true if transfer is allowed

Definition at line 650 of file agx/Frame.h.

◆ setEntityData()

void agx::Frame::setEntityData ( agxData::AttributePtr< agx::AffineMatrix4x4 localTransform,
agxData::AttributePtr< agx::AffineMatrix4x4 globalTransform 
)

Assign entity data.

◆ setLocalMatrix()

void agx::Frame::setLocalMatrix ( const agx::AffineMatrix4x4 matrix)

Assign the local transformation matrix for this frame ignoring any eventual parent transformation.

Parameters
matrix- relative to parent transform for this frame

Definition at line 526 of file agx/Frame.h.

◆ setLocalRotate() [1/2]

void agx::Frame::setLocalRotate ( const agx::EulerAngles rotation)

Assign the parent relative rotation of this frame.

Parameters
rotation- parent relative rotation

◆ setLocalRotate() [2/2]

void agx::Frame::setLocalRotate ( const agx::Quat rotation)

Assign the parent relative rotation of this frame.

Parameters
rotation- parent relative rotation

◆ setLocalTranslate() [1/2]

void agx::Frame::setLocalTranslate ( agx::Real  x,
agx::Real  y,
agx::Real  z 
)

Assign the parent relative translate of this frame.

Parameters
x- parent relative x translate
y- parent relative y translate
z- parent relative z translate

Definition at line 563 of file agx/Frame.h.

References setLocalTranslate().

◆ setLocalTranslate() [2/2]

void agx::Frame::setLocalTranslate ( const agx::Vec3 translate)

Assign the parent relative translate of this frame.

Parameters
translate- parent relative translate

Definition at line 557 of file agx/Frame.h.

Referenced by setLocalTranslate().

◆ setMatrix()

void agx::Frame::setMatrix ( const agx::AffineMatrix4x4 matrix)

This method will set the local matrix of this frame to be the matrix m multiplied with the inverse of the parents matrix: M = m * inv(parent) I.e., assign the final (world) transform of this frame.

Parameters
matrix- final transform for this frame (leads to local transform = matrix * inv(parent))

Definition at line 490 of file agx/Frame.h.

References getMatrix(), getParent(), and agx::AffineMatrix4x4T< T >::inverse().

◆ setMatrixPointers()

void agx::Frame::setMatrixPointers ( const agxData::AttributePtr< agx::AffineMatrix4x4 > &  localTransform,
const agxData::AttributePtr< agx::AffineMatrix4x4 > &  globalTransform 
)

Internal method.

Assign transforms to this frame with existing matrix storage.

◆ setParent()

bool agx::Frame::setParent ( agx::Frame frame)

Set the parent of this Frame.

This means that getTranslate, getRotate, getTransform will be given in the parents coordinate frame. I.e., this frame's transformation will be concatenated with the parents.

Parameters
frame- new parent frame, 0 to remove parent
Returns
true if parent is changed (not the same as before) - otherwise false

◆ setRotate() [1/3]

void agx::Frame::setRotate ( const agx::EulerAngles euler)

Assign the final (world) rotation of this frame.

Parameters
euler- final (world) rotate

◆ setRotate() [2/3]

void agx::Frame::setRotate ( const agx::OrthoMatrix3x3 rotation)

Assign the final (world) rotation of this frame.

Parameters
rotation- final (world) rotate

◆ setRotate() [3/3]

void agx::Frame::setRotate ( const agx::Quat rotation)

Assign the final (world) rotation of this frame.

Parameters
rotation- final (world) rotate

◆ setTranslate() [1/2]

void agx::Frame::setTranslate ( agx::Real  x,
agx::Real  y,
agx::Real  z 
)

Assign the final (world) translate of this frame.

Parameters
x- final (world) x translate of this frame
y- final (world) y translate of this frame
z- final (world) z translate of this frame

Definition at line 547 of file agx/Frame.h.

References setTranslate().

◆ setTranslate() [2/2]

void agx::Frame::setTranslate ( const agx::Vec3 translate)

Assign the final (world) translate of this frame.

Parameters
translate- final (world) translate of this frame

Definition at line 537 of file agx/Frame.h.

References getMatrix(), getParent(), and agx::AffineMatrix4x4T< T >::inverse().

Referenced by setTranslate().

◆ transferChildren()

void agx::Frame::transferChildren ( agx::Frame newParent)

Move all the frame children of this frame to the new parent while retaining the original global transformation.

That is, the matrix (getMatrix()) of all children will be the same after the move. Can Throw exception if newFrame is child of this frame, because we cannot have frames being parents to them self.

Parameters
newParent- parent frame

◆ transferDataIntoLeaves()

void agx::Frame::transferDataIntoLeaves ( bool  keepLocalVelocity = true,
bool  clearTransform = true 
)

This method takes the transformation stored in this frame, and concatenates it to all of its children.

The transform for all frames between this and the leaf will be set to identity. So you can safely call transferDataIntoLeaves on a parent frame to a rigid body, and then remove the rigid body as a child of this frame. The transformation of the rigid body will be the same.

The local velocity of bodies will be retained. So If you have a body moving along positive Y, add parent frame which rotates 90deg negative around Y, the body keep moving along positive Y (in World coordinates). But if you call parent->transferDataIntoLeaves( true ) the body will keep its local velocity, which means that it will start moving along positive X.

Parameters
keepLocalVelocity- if true, any bodies (which are leaves) will keep their local velocity (velocity will be transformed). If not, they will keep their current velocity (in world coordinates), i.e., velocities will NOT be transformed.
clearTransform- If true, then the transformation of this local frame will be set to identity at the end of this method. Otherwise this has to be done explicitly.

◆ transformPointToLocal() [1/3]

Vec3 agx::Frame::transformPointToLocal ( agx::Real  px,
agx::Real  py,
agx::Real  pz 
) const

Transform point from the world coordinate frame to this frame.

Parameters
px- x-component to transform, given in the world coordinate frame
py- y-component to transform, given in the world coordinate frame
pz- z-component to transform, given in the world coordinate frame
Returns
the given point transformed to this frame

Definition at line 632 of file agx/Frame.h.

References transformPointToLocal().

◆ transformPointToLocal() [2/3]

Vec3 agx::Frame::transformPointToLocal ( const agx::Vec3 pointWorld) const

Transform point from the world coordinate frame to this frame.

Parameters
pointWorld- point to transform, given in the world coordinate frame
Returns
the given point transformed to this frame

Definition at line 626 of file agx/Frame.h.

References transformPointToLocal().

Referenced by agxModel::NodeAttachment::createFromWorld(), and transformPointToLocal().

◆ transformPointToLocal() [3/3]

Vec3 & agx::Frame::transformPointToLocal ( const agx::Vec3 pointWorld,
agx::Vec3 pointLocal 
) const

Transform point from the world coordinate frame to this frame.

Parameters
pointWorld- point to transform, given in the world coordinate frame
pointLocal- transformed point given in this frame
Returns
a reference to the given world point transformed to this frame

Definition at line 637 of file agx/Frame.h.

References getMatrix(), agx::AffineMatrix4x4T< T >::inverse(), and agx::AffineMatrix4x4T< T >::preMult().

◆ transformPointToWorld() [1/3]

Vec3 agx::Frame::transformPointToWorld ( agx::Real  px,
agx::Real  py,
agx::Real  pz 
) const

Transform point from this frame to the world frame.

Parameters
px- x-component to transform, given in this frame
py- y-component to transform, given in this frame
pz- z-component to transform, given in this frame
Returns
the given point transformed to the world coordinate frame

Definition at line 593 of file agx/Frame.h.

References transformPointToWorld().

◆ transformPointToWorld() [2/3]

Vec3 & agx::Frame::transformPointToWorld ( const agx::Vec3 localPoint,
agx::Vec3 worldPoint 
) const

Transform point from this frame to the world frame.

Parameters
localPoint- point to transform, given in this frame
worldPoint- the transformed point given in the world coordinate frame
Returns
a reference to the transformed worldPoint point

Definition at line 598 of file agx/Frame.h.

References getMatrix(), and agx::AffineMatrix4x4T< T >::preMult().

◆ transformPointToWorld() [3/3]

Vec3 agx::Frame::transformPointToWorld ( const agx::Vec3 pointLocal) const

Transform point from this frame to the world frame.

Parameters
pointLocal- point to transform, given in this frame
Returns
the given point transformed to the world coordinate frame

Definition at line 587 of file agx/Frame.h.

References transformPointToWorld().

Referenced by transformPointToWorld().

◆ transformVectorToLocal() [1/3]

Vec3 agx::Frame::transformVectorToLocal ( agx::Real  vx,
agx::Real  vy,
agx::Real  vz 
) const

Transform vector from the world coordinate frame to this frame.

Parameters
vx- x-component to transform, given in the world coordinate world frame
vy- y-component to transform, given in the world coordinate world frame
vz- z-component to transform, given in the world coordinate world frame
Returns
the given vector transformed to this frame

Definition at line 612 of file agx/Frame.h.

References transformVectorToLocal().

◆ transformVectorToLocal() [2/3]

Vec3 & agx::Frame::transformVectorToLocal ( const agx::Vec3 vectorWorld,
agx::Vec3 vectorLocal 
) const

Transform vector from the world coordinate frame to this frame.

Parameters
vectorWorld- vector to transform, given in the world coordinate frame
vectorLocal- transformed vector given in this frame
Returns
a reference to the given world vector transformed to this frame

Definition at line 617 of file agx/Frame.h.

References getMatrix(), agx::AffineMatrix4x4T< T >::postMult(), and agx::AffineMatrix4x4T< T >::setTranslate().

◆ transformVectorToLocal() [3/3]

Vec3 agx::Frame::transformVectorToLocal ( const agx::Vec3 worldVector) const

Transform vector from the world coordinate frame to this frame.

Parameters
worldVector- vector to transform, given in the world coordinate world frame
Returns
the given vector transformed to this frame

Definition at line 606 of file agx/Frame.h.

References transformVectorToLocal().

Referenced by transformVectorToLocal().

◆ transformVectorToWorld() [1/3]

Vec3 agx::Frame::transformVectorToWorld ( agx::Real  vx,
agx::Real  vy,
agx::Real  vz 
) const

Transform vector from this frame to the world frame.

Parameters
vx- x-component to transform, given in this frame
vy- y-component to transform, given in this frame
vz- z-component to transform, given in this frame
Returns
the given vector transformed to the world coordinate frame

Definition at line 574 of file agx/Frame.h.

References transformVectorToWorld().

◆ transformVectorToWorld() [2/3]

Vec3 & agx::Frame::transformVectorToWorld ( const agx::Vec3 localVector,
agx::Vec3 worldVector 
) const

Transform vector from this frame to the world frame.

Parameters
localVector- vector to transform, given in this frame
worldVector- the transformed vector given in the world coordinate frame
Returns
a reference to the transformed worldVector vector

Definition at line 579 of file agx/Frame.h.

References getMatrix(), and agx::Matrix4x4T< T >::transform3x3().

◆ transformVectorToWorld() [3/3]

Vec3 agx::Frame::transformVectorToWorld ( const agx::Vec3 vectorLocal) const

Transform vector from this frame to the world frame.

Parameters
vectorLocal- vector to transform, given in this frame
Returns
the given vector transformed to the world coordinate frame

Definition at line 568 of file agx/Frame.h.

References transformVectorToWorld().

Referenced by transformVectorToWorld().

◆ updateLocalMatrix()

void agx::Frame::updateLocalMatrix ( )

Internal method.

Updates local transform given global transform and parents.

Definition at line 500 of file agx/Frame.h.

◆ updateLocalMatrixSSE()

void agx::Frame::updateLocalMatrixSSE ( )

Internal method.

Performs the same operation as updateLocalMatrix but will use SSE implementation instead. It is important that the data is aligned correctly and it is the callers responsibility to know if this method can be used.

If in doubt, pick updateLocalMatrix instead.


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