17 #ifndef AGXSDK_ASSEMBLY_H 18 #define AGXSDK_ASSEMBLY_H 134 bool remove(
agx::RigidBody* body,
bool removeAssociatedGeometries =
false);
321 template <
typename T >
322 T* getConstraint(
const agx::Name& name,
bool recursive =
true);
333 template <
typename T >
334 const T* getConstraint(
const agx::Name& name,
bool recursive =
true)
const;
422 const AssemblyRefSet& getAssemblies()
const;
442 const InteractionRefSetVector& getInteractions()
const;
447 const ObserverFrameRefSetVector& getObserverFrames()
const;
493 void setLocalPosition(
const agx::Vec3& p );
530 void setLocalRotation(
const agx::Quat& q );
606 virtual void setVelocity(
const agx::Vec3& velocity);
612 virtual void setAngularVelocity(
const agx::Vec3& velocity);
663 void removeFromSimulation(
Simulation* simulation);
673 EventListenerRefSet m_listeners;
675 InteractionRefSetVector m_interactions;
677 ContactMaterialRefSet m_contactMaterials;
678 ParticleSystemRefSet m_particleSystems;
680 AssemblyRefSet m_assemblies;
683 ObserverFrameRefSetVector m_observers;
692 return m_frame.get();
697 return m_frame.get();
713 bool succeed()
const;
737 virtual void visit(
const Assembly*)
const;
756 template<
typename T >
759 return dynamic_cast< T*
>(this->getConstraint(name, recursive));
762 template<
typename T >
765 return dynamic_cast< const T*
>(this->getConstraint(name, recursive));
agx::SetVector< agx::InteractionRef > InteractionRefSetVector
AGXCORE_EXPORT Type * getType(const agx::String &name)
agx::SetVector< agx::ref_ptr< agx::ContactMaterial > > ContactMaterialRefSet
virtual void visit(const EventListener *) const
#define AGX_ADD_FRAME_TRANSFORM_INTERFACE()
virtual void visit(const agx::Interaction *) const
virtual void visit(const agx::Constraint *) const
virtual void removeNotification(agxSDK::Simulation *)
Called when this assembly is removed from a simulation.
virtual void visit(EventListener *)
Type
Specifies the type an assembly is.
Specialization for constraints that have only one degree of freedom such as Hinge and Prismatic...
virtual void visit(agx::Interaction *)
virtual void visit(agx::ContactMaterial *)
#define AGXPHYSICS_EXPORT
virtual void visit(const agxCollide::Geometry *) const
The base class for a constraint.
#define AGX_DECLARE_POINTER_TYPES(type)
Specialization for constraints that have only one degree of freedom such as Hinge and Prismatic...
Representation of a name string.
virtual void visit(agx::ObserverFrame *)
virtual void addNotification(Assembly *)
Called when this assembly is added to another assembly.
Spawns new bodys inside a given volume.
virtual void visit(agx::RigidBody *)
static Assembly * asAssembly(agxStream::Serializable *obj)
Base class providing referencing counted objects.
The geometry representation used by the collision detection engine.
The base class for interactions.
virtual void visit(agx::Emitter *)
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
A basic particle system that contains all the storages and buffers required for basic operation and a...
agx::SetVector< agx::ref_ptr< agxSDK::Assembly > > AssemblyRefSet
virtual void visit(const agx::Emitter *) const
virtual agx::Frame * getFrame()
Return a reference to the frame containing transformation and velocity information for this assembly...
const agx::Constraint * getConstraint(const agx::Uuid &uuid, bool recursive=true) const
Find (linear search) and return a pointer to a Constraint with the given uuid.
virtual void visit(agxCollide::Geometry *)
virtual void visit(const agx::ParticleSystem *) const
agx::Constraint2DOF * getConstraint2DOF(const agx::Name &name, bool recursive=true)
void setSucceed(bool flag)
virtual void visit(const agx::ObserverFrame *) const
virtual void visit(const agx::RigidBody *) const
The rigid body class, combining a geometric model and a frame of reference.
agx::ObserverFrameRefSetVector ObserverFrameRefSetVector
agx::Constraint1DOF * getConstraint1DOF(const agx::Name &name, bool recursive=true)
A UUID, or Universally unique identifier, is intended to uniquely identify information in a distribut...
The object defining a frame of reference and providing transformations operations.
agx::SetVector< agx::ref_ptr< agxSDK::EventListener > > EventListenerRefSet
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
virtual void visit(agx::ParticleSystem *)
agx::SetVector< agx::ref_ptr< agx::ParticleSystem > > ParticleSystemRefSet
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
An EventListener can be associated to a Simulation and triggered upon various events.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
This is a full fledged Assembly which uses Frame for the hierarchy.
virtual void visit(agx::Constraint *)
Class for visiting all elements in a tree of Assemblies.
virtual void visit(const agx::ContactMaterial *) const
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
virtual void removeNotification(Assembly *)
Called when this assembly is removed from another assembly.
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints, geometries.
Specialized types of matrices for holding orthogonal transformation matrices.
With this class you can attach an ObserverFrame object relative to a RigidBody.