 |
AGX Dynamics
2.38.0.2
|
Go to the documentation of this file.
92 void setRate(
Real rate);
103 void setVelocity(
const Vec3& velocity);
108 const Vec3& getVelocity()
const;
118 void setDistributionTable(DistributionTable *table);
126 void setUseFixedPosition(
bool enable);
131 bool getUseFixedPosition()
const;
139 void setUseFixedRotation(
bool enable );
144 bool getUseFixedRotation()
const;
153 void setFixedPositionOffset(
const agx::Vec3& fixedPositionOffset );
161 void setFixedRotationOffset(
const agx::Quat& fixedRotationOffset );
166 agx::Vec3 getFixedPositionOffset()
const;
171 agx::Quat getFixedRotationOffset()
const;
176 DistributionTable *getDistributionTable();
177 const DistributionTable *getDistributionTable()
const;
200 agx::Real getMaximumEmittedQuantity()
const;
211 void addCollisionGroup(
const agx::Name& name);
218 void removeCollisionGroup(
const agx::Name& name);
227 bool hasCollisionGroup(
agx::Name id)
const;
239 void setEnableOverrideRenderSettings(
bool enable);
244 bool getEnableOverrideRenderSettings()
const;
254 void setEnableRenderEmittedObjects(
bool enable);
260 bool getEnableRenderEmittedObjects()
const;
273 virtual
void transfer(
agxSDK::Simulation *simulation);
277 static
agxStream::Serializable* create() {
return nullptr; }
283 virtual
void run() override;
288 virtual
void emitBody(const
Vec3& position,
289 const
Quat& rotation,
290 const
Vec3& velocity,
291 Emitter::DistributionModel *model) = 0;
292 virtual
bool preEmit() = 0;
293 virtual
void postEmit() = 0;
294 virtual
Real getDefaultElementQuantity(Quantity quantity);
296 virtual
void store(
agxStream::OutputArchive&
out ) const override;
297 virtual
void restore(
agxStream::InputArchive&
in ) override;
299 void setEmittedQuantity(
agx::
Real quantity);
300 void setEmittedCount(
agx::
UInt emittedCount);
303 agx::
Real generateRandomNumber();
308 OVERRIDE_RENDER_SETTINGS = 1 << 0,
309 SHOULD_RENDER_EMITTED_OBJECTS = 1 << 1,
310 FIXED_POSITION = 1 << 2,
311 FIXED_ROTATION = 1 << 3
313 using Flags = agx::BitState<StateFlags, agx::UInt32>;
351 DistributionModel(
agx::Real probabilityWeight);
356 void setProbabilityWeight(
agx::Real weight);
381 virtual ~DistributionModel();
382 virtual
agx::
Real calculateVolume() = 0;
383 virtual
agx::
Real calculateMass() = 0;
384 virtual
void store(
agxStream::OutputArchive&
out ) const override;
385 virtual
void restore(
agxStream::InputArchive&
in ) override;
388 friend class DistributionTable;
389 void setDistribution(DistributionTable *distribution);
391 static
bool rangeCompare(DistributionModel *model,
agx::
Real value);
394 DistributionTable *m_distribution;
405 DistributionTable(
Quantity quantity = QUANTITY_COUNT);
410 void addModel(DistributionModel *model);
420 DistributionModel *getRandomModel();
435 void setProbabilityQuantity(
Quantity quantity);
440 Quantity getProbabilityQuantity()
const;
449 virtual ~DistributionTable();
452 friend class DistributionModel;
453 void rebuildProbabilityTable();
455 agx::Real getQuantifiedProbabilityWeight(DistributionModel *model)
const;
456 agx::Real calculateTotalQuantifiedWeight()
const;
484 m_entity.collisionGroupSet() = set;
friend class DistributionModel
UniformRealGenerator m_generator
agx::Quat m_fixedRotationOffset
agxCollide::GeometryRef m_geometry
agxCollide::SpaceRef m_space
agxCollide::GeometryRef m_proxySphere
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.
bool hasCollisionGroup(agx::UInt32 id) const
This is performing a linear search among the group id for this Emitter.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
#define DOXYGEN_END_INTERNAL_BLOCK()
friend class DistributionTable
#define DOXYGEN_START_INTERNAL_BLOCK()
Pointer to a entity instance of type Physics.Emitter.
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
agxCollide::Geometry * getGeometry()
agx::SetVector< ref_ptr< Emitter > > EmitterRefSetVector
Axis aligned bounding box implementation.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
DistributionTableRef m_distributionTable
#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...
agx::Physics::CollisionGroupSetPtr getCollisionGroupSet() const
#define AGX_DECLARE_VECTOR_TYPES(type)
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
Physics::EmitterPtr m_entity
ScalarParameterRef m_timestep
agx::BitState< StateFlags, agx::UInt32 > Flags
The geometry representation used by the collision detection engine.
Representation of a name string.
static bool hasGroup(agx::Physics::CollisionGroupSetPtr set, agx::UInt32 groupId)
Base class providing referencing counted objects.
#define AGX_DECLARE_POINTER_TYPES(type)
This namespace consists of a set of classes for handling geometric intersection tests including boole...
agx::Vec3 m_fixedPositionOffset
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.
Vec3T< T > max(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
Spawns new bodys inside a given volume.
Pointer to a entity instance of type Physics.CollisionGroupSet.
AGXCORE_EXPORT EntityModel * getEntity(const agx::Path &path)
Get a entity with a specified path.