 |
AGX Dynamics
2.38.0.2
|
Go to the documentation of this file.
21 # pragma warning(push)
22 # pragma warning( disable: 4290) //: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
123 bool hasParent()
const;
166 void setTranslate(
const agx::Vec3& translate );
185 void setLocalTranslate(
const agx::Vec3& translate );
204 void setRotate(
const agx::Quat& rotation );
221 Quat getLocalRotate()
const;
227 void setLocalRotate(
const agx::Quat& rotation );
350 void transferDataIntoLeaves(
bool keepLocalVelocity =
true,
bool clearTransform=
true );
362 void setAllowTransferIntoChildren(
bool allow );
367 bool allowTransferDataIntoChildren()
const;
376 void transferChildren(
agx::Frame* newParent );
381 bool hasChildren()
const;
393 void removeAllChildren();
420 void updateLocalMatrix();
430 void updateLocalMatrixSSE();
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();
663 for(; it != m_children.
end(); ++it)
665 (*it)->m_parent =
nullptr;
672 if(m_children.
erase( frame ))
674 frame->m_parent =
nullptr;
682 return m_rigidBody.
get();
690 #define AGX_ADD_FRAME_TRANSFORM_INTERFACE() \
691 AGX_FORCE_INLINE const agx::AffineMatrix4x4& getTransform() const { return getFrame()->getMatrix(); } \
692 AGX_FORCE_INLINE agx::Vec3 getPosition() const { return getFrame()->getTranslate(); } \
693 AGX_FORCE_INLINE agx::Quat getRotation() const { return getFrame()->getRotate(); }
698 # pragma warning(pop)
void setTranslate(const agx::Vec3 &translate)
Assign the final (world) translate of this frame.
static agx::Vec3 transformPointToWorld(const agx::Vec3 &p, const agxCollide::Geometry *g)
Transforms a point given in shape coordinates to world given geometry g.
Specialized types of matrices for holding orthogonal transformation matrices.
The rigid body class, combining a geometric model and a frame of reference.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
agx::Vec3 getTranslate() const
Vec3T< T > & transform3x3(const Vec3T< T > &vIn, Vec3T< T > &vOut) const
bool erase(const T2 &key)
Erase an element from the container.
agx::Vec3 transformPointToLocal(const agx::Vec3 &pointWorld) const
Transform point from the world coordinate frame to this frame.
agx::VectorPOD< FramePtr > FramePtrVector
const agx::AffineMatrix4x4 & getMatrix() const
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
void removeAllChildren()
Remove all children of this frame.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
#define AGXPHYSICS_EXPORT
void preMult(const AffineMatrix4x4T< T > &)
void clear(ClearPolicy policy=SHRINK_BUFFER_AVERAGED)
Remove all elements.
bool empty() const
Return true if the container is empty.
void setLocalMatrix(const agx::AffineMatrix4x4 &matrix)
Assign the local transformation matrix for this frame ignoring any eventual parent transformation.
const agx::AffineMatrix4x4 & getLocalMatrix() const
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
void setLocalTranslate(const agx::Vec3 &translate)
Assign the parent relative translate of this frame.
agx::Vec3 transformVectorToLocal(const agx::Vec3 &worldVector) const
Transform vector from the world coordinate frame to this frame.
Vec3T< T > getTranslate() const
bool removeChild(agx::Frame *frame)
Remove a specified frame from the list of children.
The geometry representation used by the collision detection engine.
agx::RigidBody * getRigidBody()
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
bool allowTransferDataIntoChildren() const
agx::Vec3 transformVectorToWorld(const agx::Vec3 &vectorLocal) const
Transform vector from this frame to the world 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...
Base class providing referencing counted objects.
#define AGX_DECLARE_POINTER_TYPES(type)
void updateLocalMatrix()
Internal method.
This namespace consists of a set of classes for handling geometric intersection tests including boole...
agx::Vec3 transformPointToWorld(const agx::Vec3 &pointLocal) const
Transform point from this frame to the world frame.
void setAllowTransferIntoChildren(bool allow)
Specifies whether a transferDataIntoLeaves() operation will go into this frames children (including a...
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
AffineMatrix4x4T< T > inverse() const
Quick inverse, transpose rotation part, and change sign of translation part.
AffineMatrix4x4T< T > & setTranslate(const Vec3T< T > &t)
Set the translational part of the matrix using the vector t.
The object defining a frame of reference and providing transformations operations.
static agx::Vec3 transformVectorToWorld(const agx::Vec3 &v, const agxCollide::Geometry *g)
Transforms a vector given in shape coordinates to world coordinates given geometry g.
void postMult(const AffineMatrix4x4T< T > &)
agx::Vec3 getLocalTranslate() const