17 #ifndef AGX_ATTACHMENT_H 18 #define AGX_ATTACHMENT_H 24 # pragma warning( push ) 25 # pragma warning( disable : 4251 ) // class X needs to have dll-interface to be used by clients of class Y 26 # pragma warning(disable: 6385) // Disable warning C6385: Reading invalid data 132 virtual agx::Vec3 getLinearVelocity()
const;
137 virtual agx::Vec3 getAngularVelocity()
const;
142 template<
typename T >
150 template<
typename T >
157 template<
typename T >
165 template<
typename T >
172 template<
typename T >
173 const T* safeAs()
const;
220 virtual agx::Bool objectDeleted()
const override;
225 virtual agx::Bool valid()
const override;
251 virtual agx::Vec3 getLinearVelocity()
const override;
256 virtual agx::Vec3 getAngularVelocity()
const override;
457 AttachmentRef m_attachments[ 2 ];
465 return m_transformed[ entry ];
473 template<
typename T >
476 return dynamic_cast< const T*
>( this ) !=
nullptr;
485 template<
typename T >
493 agxAssert( (
void *)
this ==
nullptr || this->is<T>() );
494 return static_cast< T*
>( this );
498 template<
typename T >
501 return dynamic_cast< T*
>( this );
504 template<
typename T >
512 agxAssert( (
void *)
this ==
nullptr || this->is< T >() );
return static_cast< const T*
>( this );
516 template<
typename T >
519 return dynamic_cast< const T*
>( this );
530 return m_attachments[ i ].get();
545 return m_transformed[ entry ];
550 #pragma warning( pop )
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
Constraint attachment z-axis.
agx::RigidBody * getRigidBody() const
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive...
Transformed
Data access enum.
virtual ~CustomData()
Reference counted object, protected destructor.
agx::ref_ptr< CustomData > CustomDataRef
agx::ref_ptr< Attachment > AttachmentRef
agx::Frame * getFrame() const
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
#define AGXPHYSICS_EXPORT
agx::Attachment * getAttachment2() const
Constraint attachment class for agx::RigidBody.
Constraint attachment world position.
Constraint attachment x-axis.
Custom data for separation pair.
Base class providing referencing counted objects.
agx::Attachment * operator[](agx::UInt i) const
const agx::Vec3 & get(agx::Attachment::Transformed entry) const
Constraint attachment pair class.
Constraint attachment base class for any type of frame.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
agx::ref_ptr< RigidBodyAttachment > RigidBodyAttachmentRef
const agx::Vec3 & get(agx::AttachmentPair::Transformed entry) const
T * as()
Unsafe version, static cast of this to T.
The rigid body class, combining a geometric model and a frame of reference.
agx::Attachment * getAttachment1() const
A class holding 3 dimensional vectors and providing basic arithmetic.
Abstract base class for storing/restoring a line/drums with version control.
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...
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Class for writing serialized data in binary format to a stream.
Constraint attachment y-axis.
Separation vector, i.e., the vector from frame 2 to frame 1.
agx::RigidBodyObserver m_rb
Transformed
Data access enum.
Real getAngle(const Vec3 &a, const Vec3 &b, const Vec3 &c)
a and b should be orthogonal
T * safeAs()
Dynamic cast of this to T.
Vector from center of mass (if moving) to anchor point given in world frame.
CustomDataRef m_customData