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 clear(ClearPolicy policy=SHRINK_BUFFER_AVERAGED)
Remove all elements.
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
bool removeChild(agx::Frame *frame)
Remove a specified frame from the list of children.
void setTranslate(const agx::Vec3 &translate)
Assign the final (world) translate of this frame.
void postMult(const AffineMatrix4x4T< T > &)
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...
#define AGXPHYSICS_EXPORT
bool empty() const
Return true if the container is empty.
agx::Vec3 transformVectorToWorld(const agx::Vec3 &vectorLocal) const
Transform vector from this frame to the world frame.
#define AGX_DECLARE_POINTER_TYPES(type)
void setLocalMatrix(const agx::AffineMatrix4x4 &matrix)
Assign the local transformation matrix for this frame ignoring any eventual parent transformation...
AffineMatrix4x4T< T > inverse() const
Quick inverse, transpose rotation part, and change sign of translation part.
Vec3T< T > getTranslate() const
bool allowTransferDataIntoChildren() const
agx::Vec3 getTranslate() const
void removeAllChildren()
Remove all children of this frame.
Base class providing referencing counted objects.
The geometry representation used by the collision detection engine.
agx::Vec3 getLocalTranslate() const
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
agx::Vec3 transformVectorToLocal(const agx::Vec3 &worldVector) const
Transform vector from the world coordinate frame to this frame.
void preMult(const AffineMatrix4x4T< T > &)
void setLocalTranslate(const agx::Vec3 &translate)
Assign the parent relative translate of this frame.
void updateLocalMatrix()
Internal method.
agx::Vec3 transformPointToLocal(const agx::Vec3 &pointWorld) const
Transform point from the world coordinate frame to this frame.
The rigid body class, combining a geometric model and a frame of reference.
agx::RigidBody * getRigidBody()
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...
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...
const agx::AffineMatrix4x4 & getLocalMatrix() const
void setAllowTransferIntoChildren(bool allow)
Specifies whether a transferDataIntoLeaves() operation will go into this frames children (including a...
static agx::Vec3 transformPointToWorld(const agx::Vec3 &p, const agxCollide::Geometry *g)
Transforms a point given in shape coordinates to world given geometry g.
const agx::AffineMatrix4x4 & getMatrix() const
Vec3T< T > & transform3x3(const Vec3T< T > &vIn, Vec3T< T > &vOut) const
AffineMatrix4x4T< T > & setTranslate(const Vec3T< T > &t)
Set the translational part of the matrix using the vector t.
agx::Vec3 transformPointToWorld(const agx::Vec3 &pointLocal) const
Transform point from this frame to the world frame.
bool erase(const T2 &key)
Erase an element from the container.
Specialized types of matrices for holding orthogonal transformation matrices.