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;
487 FramePtrVector m_children;
492 m_localTransform.get() = matrix;
493 const Frame* parent = getParent();
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();
534 return getMatrix().getTranslate();
540 m_localTransform.get().setTranslate ( translate * m_parent->getMatrix().inverse() );
542 m_localTransform.get().setTranslate( translate );
544 this->postTransformUpdate();
549 setTranslate(
Vec3( x, y, z ) );
554 return m_localTransform.get().getTranslate();
559 m_localTransform.get().setTranslate( translate );
560 this->postTransformUpdate();
565 setLocalTranslate(
Vec3( x, y, z ) );
602 worldPoint = m.
preMult( localPoint );
609 return transformVectorToLocal( worldVector, localVector );
614 return transformVectorToLocal(
Vec3( vx, vy, vz ) );
622 vectorLocal = m.
postMult( vectorWorld );
629 return transformPointToLocal( pointWorld, pointLocal );
634 return transformPointToLocal(
Vec3( px, py, pz ) );
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) Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
void postMult(const AffineMatrix4x4T< T > &)
This namespace consists of a set of classes for handling geometric intersection tests including boole...
#define AGXPHYSICS_EXPORT
#define AGX_DECLARE_POINTER_TYPES(type)
VectorType::iterator iterator
Vec3T< T > & transform3x3(const Vec3T< T > &vIn, Vec3T< T > &vOut) const
void get(QuatT< T > &q) const
Base class providing referencing counted objects.
The geometry representation used by the collision detection engine.
const agx::AffineMatrix4x4 & getMatrix() const
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
void preMult(const AffineMatrix4x4T< T > &)
The rigid body class, combining a geometric model and a frame of reference.
The object defining a frame of reference and providing transformations operations.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
AffineMatrix4x4T< T > inverse() const
Quick inverse, transpose rotation part, and change sign of translation part.
agx::VectorPOD< FramePtr > FramePtrVector
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...
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
static agx::Vec3 transformPointToWorld(const agx::Vec3 &p, const agxCollide::Geometry *g)
Transforms a point given in shape coordinates to world given geometry g.
AffineMatrix4x4T< T > & setTranslate(const Vec3T< T > &t)
Set the translational part of the matrix using the vector t.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Specialized types of matrices for holding orthogonal transformation matrices.