 |
AGX Dynamics
2.38.0.2
|
Go to the documentation of this file.
18 #ifndef AGX_RIGIDBODY_EMITTER_H
19 #define AGX_RIGIDBODY_EMITTER_H
54 CREATED_BY_RIGIDBODYEMITTER = 1 << 0,
55 CREATED_BY_SNAPSHOT_LOADING = 1 << 1,
56 IS_BODYMODEL_TEMPLATE = 1 << 2
58 typedef agx::BitState< EState, agx::Int32 >
State;
60 RigidBodyEmitterInternalData() : state() {}
64 virtual ~RigidBodyEmitterInternalData() {}
70 child =
new RigidBodyEmitterInternalData();
72 child->
as<RigidBodyEmitterInternalData>()->state = this->state;
128 static void setRigidBodyIsEmitted(
agx::RigidBody * body,
bool isEmitted );
136 static void setRigidBodyIsLoaded(
agx::RigidBody * body,
bool isLoaded );
148 static void setRigidBodyIsTemplate(
agx::RigidBody* body,
bool isTemplate);
165 static RigidBodyEmitterInternalData* getRigidBodyEmitterData(const
agx::
RigidBody* obj);
167 static RigidBodyEmitterInternalData* getOrCreateRigidBodyEmitterData(
agx::
RigidBody* obj);
176 virtual
void emitBody(const
Vec3& position,
177 const
Quat& rotation,
178 const
Vec3& velocity,
179 Emitter::DistributionModel *model) override;
180 virtual
bool preEmit() override;
181 virtual
void postEmit() override;
183 virtual
void transfer(
agxSDK::Simulation *simulation) override;
192 agxSDK::Simulation *m_simulation;
239 virtual ~DistributionModel();
240 virtual
agx::
Real calculateVolume() override;
241 virtual
agx::
Real calculateMass() override;
agx::ref_ptr< ICloneable > ICloneableRef
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.
The rigid body class, combining a geometric model and a frame of reference.
#define DOXYGEN_END_INTERNAL_BLOCK()
friend class DistributionTable
#define DOXYGEN_START_INTERNAL_BLOCK()
Interface class for a cloneable reference counted object.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
T * as()
Subclass casting.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
#define AGXPHYSICS_EXPORT
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...
Event3< RigidBodyEmitter *, agx::RigidBody *, DistributionModel * > Event
#define AGX_DECLARE_VECTOR_TYPES(type)
With this class you can attach an ObserverFrame object relative to a RigidBody.
Smart pointer for handling referenced counted objects.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Spawns new Rigid Bodies inside a volume given to the Emitter.
#define AGX_DECLARE_POINTER_TYPES(type)
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
void AGXPHYSICS_EXPORT init()
Initialize AGX Dynamics API including thread resources and must be executed before using the AGX API.
Spawns new bodys inside a given volume.