22# pragma warning( disable: 4290)
123 bool hasParent()
const;
166 void setTranslate(
const agx::Vec3& translate );
185 void setLocalTranslate(
const agx::Vec3& translate );
362 void setAllowTransferIntoChildren(
bool allow );
367 bool allowTransferDataIntoChildren()
const;
381 bool hasChildren()
const;
420 void updateLocalMatrix();
457 void propagateUpdate();
464 void postTransformUpdate();
485 bool m_allowTransferDataIntoChildren;
492 m_localTransform.get() = matrix;
497 this->postTransformUpdate();
502 m_localTransform.get() = m_parent ? m_globalTransform.get() * m_parent->m_globalTransform.get().inverse() : m_globalTransform.get();
518 return m_parent !=
nullptr;
523 return m_localTransform.get();
528 m_localTransform.get() = matrix;
529 this->postTransformUpdate();
540 m_localTransform.get().setTranslate ( translate * m_parent->
getMatrix().
inverse() );
542 m_localTransform.get().setTranslate( translate );
544 this->postTransformUpdate();
554 return m_localTransform.get().getTranslate();
559 m_localTransform.get().setTranslate( translate );
560 this->postTransformUpdate();
602 worldPoint = m.
preMult( localPoint );
622 vectorLocal = m.
postMult( vectorWorld );
641 pointLocal = m.
preMult( pointWorld );
647 return m_allowTransferDataIntoChildren;
652 m_allowTransferDataIntoChildren = allow;
657 return !m_children.
empty();
660 #define AGX_ADD_FRAME_TRANSFORM_INTERFACE() \
661 AGX_FORCE_INLINE const agx::AffineMatrix4x4& getTransform() const { return getFrame()->getMatrix(); } \
662 AGX_FORCE_INLINE agx::Vec3 getPosition() const { return getFrame()->getTranslate(); } \
663 AGX_FORCE_INLINE agx::Quat getRotation() const { return getFrame()->getRotate(); }
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
void postMult(const AffineMatrix4x4T< T > &)
void preMult(const AffineMatrix4x4T< T > &)
AffineMatrix4x4T< T > & setTranslate(const Vec3T< T > &t)
Set the translational part of the matrix using the vector t.
AffineMatrix4x4T< T > inverse() const
Quick inverse, transpose rotation part, and change sign of translation part.
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
The object defining a frame of reference and providing transformations operations.
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...
void setTranslate(const agx::Vec3 &translate)
Assign the final (world) translate of this frame.
Quat getLocalRotate() const
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...
void setEntityData(agxData::AttributePtr< agx::AffineMatrix4x4 > localTransform, agxData::AttributePtr< agx::AffineMatrix4x4 > globalTransform)
Assign entity data.
void setRotate(const agx::Quat &rotation)
Assign the final (world) rotation of this frame.
void setAllowTransferIntoChildren(bool allow)
Specifies whether a transferDataIntoLeaves() operation will go into this frames children (including a...
agx::Vec3 transformPointToLocal(const agx::Vec3 &pointWorld) const
Transform point from the world coordinate frame to this frame.
const agx::AffineMatrix4x4 & getMatrix() const
agx::Vec3 transformVectorToWorld(const agx::Vec3 &vectorLocal) const
Transform vector from this frame to the world frame.
void setLocalMatrix(const agx::AffineMatrix4x4 &matrix)
Assign the local transformation matrix for this frame ignoring any eventual parent transformation.
agx::Vec3 transformVectorToLocal(const agx::Vec3 &worldVector) const
Transform vector from the world coordinate frame to this frame.
agx::RigidBody * getRigidBody()
bool removeChild(agx::Frame *frame)
Remove a specified frame from the list of children.
const agx::RigidBody * getRigidBody() const
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::OrthoMatrix3x3 &rotation)
Assign the final (world) rotation of this frame.
bool allowTransferDataIntoChildren() const
void removeAllChildren()
Remove all children of this frame.
const agx::AffineMatrix4x4 & getLocalMatrix() const
Frame()
Default constructor.
void transferChildren(agx::Frame *newParent)
Move all the frame children of this frame to the new parent while retaining the original global trans...
void updateLocalMatrix()
Internal method.
agx::Vec3 getTranslate() const
Frame(const agxData::AttributePtr< AffineMatrix4x4 > &localTransform, const agxData::AttributePtr< AffineMatrix4x4 > &globalTransform)
Frame with existing matrix storage.
void setLocalTranslate(const agx::Vec3 &translate)
Assign the parent relative translate of this frame.
void setLocalRotate(const agx::Quat &rotation)
Assign the parent relative rotation of this frame.
agx::Vec3 getLocalTranslate() const
agx::Vec3 transformPointToWorld(const agx::Vec3 &pointLocal) const
Transform point from this frame to the world frame.
void setRotate(const agx::EulerAngles &euler)
Assign the final (world) rotation of this frame.
agx::Quat getRotate() const
Frame(const agx::Frame &frame)
Copy constructor.
virtual ~Frame()
Protected destructor - reference counted object.
Frame(const agx::AffineMatrix4x4 matrix)
Instantiate a frame with relative transformation matrix.
void updateLocalMatrixSSE()
Internal method.
void setLocalRotate(const agx::EulerAngles &rotation)
Assign the parent relative rotation of this frame.
Vec3T< T > & transform3x3(const Vec3T< T > &vIn, Vec3T< T > &vOut) const
Vec3T< T > getTranslate() const
Specialized types of matrices for holding orthogonal transformation matrices.
Base class providing referencing counted objects.
The rigid body class, combining a geometric model and a frame of reference.
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
bool empty() const
Return true if the container is empty.
Smart pointer for observed objects, that automatically set pointers to them to null when they deleted...
This namespace consists of a set of classes for handling geometric intersection tests including boole...
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.