21 #ifndef GENERATED_AGX_PHYSICS_EMITTER_H_PLUGIN 22 #define GENERATED_AGX_PHYSICS_EMITTER_H_PLUGIN 24 #define AGX_ENTITY_WRAPPER 1 28 # pragma warning(push) 30 # pragma warning( disable : 4505 ) 32 # pragma warning( disable : 4251 ) 34 # pragma warning( disable : 4355 ) 36 # pragma warning( disable: 4714 ) 54 namespace agx {
class Emitter; }
56 namespace agx {
namespace Physics {
class GeometryPtr; }}
57 namespace agx {
namespace Physics {
class CollisionGroupSetPtr; }}
67 class EmitterInstance;
68 class EmitterSemantics;
93 virtual void shutdownCleanup()
override;
113 virtual void configure(agx::TiXmlElement* eEntity)
override;
114 virtual void initAttributeAccessors()
override;
121 #ifndef AGX_PHYSICS_EMITTER_DATA_SET_OVERRIDE 122 #define AGX_PHYSICS_EMITTER_DATA_SET 126 EmitterInstance operator[] (
size_t index);
150 typedef agx::Real emittedQuantityMaximumType;
160 virtual ~EmitterData() {}
161 virtual void setNumElements(
agx::Index numElements)
override;
164 EmitterData& operator= (
const EmitterData&) {
return *
this; }
183 agx::Real const& getEmittedQuantity()
const;
184 agx::Real const& getEmittedQuantityMaximum()
const;
185 agx::UInt const& getEmittedCount()
const;
196 void setVelocity(
agx::Vec3 const& value);
198 void setEmittedQuantity(
agx::Real const& value);
199 void setEmittedQuantityMaximum(
agx::Real const& value);
200 void setEmittedCount(
agx::UInt const& value);
207 friend class EmitterInstance;
236 EmitterData* getData();
237 const EmitterData* getData()
const;
306 EmitterInstance(EmitterData* data,
agx::Index index);
311 EmitterData* getData();
312 const EmitterData* getData()
const;
348 agx::Real const& emittedQuantity()
const;
353 agx::Real const& emittedQuantityMaximum()
const;
384 inline EmitterInstance
agx::Physics::EmitterData::operator[] (
size_t index) {
return EmitterInstance(
this, (
agx::Index)index); }
391 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
398 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
406 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
415 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
462 AGX_FORCE_INLINE EmitterInstance::EmitterInstance(EmitterData* data,
agx::Index index) : agx::ReferencedInstance(data, index) {}
467 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
474 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
495 AGX_FORCE_INLINE agx::Vec3 const& EmitterInstance::velocity()
const { verifyIndex();
return getData()->velocity[getIndex()]; }
500 AGX_FORCE_INLINE agx::Real& EmitterInstance::emittedQuantity() { verifyIndex();
return getData()->emittedQuantity[getIndex()]; }
501 AGX_FORCE_INLINE agx::Real const& EmitterInstance::emittedQuantity()
const { verifyIndex();
return getData()->emittedQuantity[getIndex()]; }
503 AGX_FORCE_INLINE agx::Real& EmitterInstance::emittedQuantityMaximum() { verifyIndex();
return getData()->emittedQuantityMaximum[getIndex()]; }
504 AGX_FORCE_INLINE agx::Real const& EmitterInstance::emittedQuantityMaximum()
const { verifyIndex();
return getData()->emittedQuantityMaximum[getIndex()]; }
506 AGX_FORCE_INLINE agx::UInt& EmitterInstance::emittedCount() { verifyIndex();
return getData()->emittedCount[getIndex()]; }
507 AGX_FORCE_INLINE agx::UInt const& EmitterInstance::emittedCount()
const { verifyIndex();
return getData()->emittedCount[getIndex()]; }
526 # pragma warning(pop) 529 #undef AGX_ENTITY_WRAPPER 530 #undef AGX_ENTITY_NAMESPACE AGXPHYSICS_EXPORT EmitterPtr & operator=(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::UInt32 & id()
agxData::EntityData * getData()
AGXPHYSICS_EXPORT agx::Real & rate()
AGXPHYSICS_EXPORT EmitterInstance instance()
AGXPHYSICS_EXPORT EmitterSemantics * operator->()
AGXPHYSICS_EXPORT agx::UInt32 & seed()
agxData::EntityInstance instance()
AGXPHYSICS_EXPORT agx::Real & emittedQuantityMaximum()
An entity reference is a safe/referencing handle to an entity instance whose model is descendant from...
static agxData::ScalarAttributeT< agx::UInt32 > * idAttribute
Data storage for a collection of entity instances of a specified EntityModel.
#define agxAssertN(expr, format,...)
agxData::EntityData * getData()
agx::String fullPath() const
static agxData::ScalarAttributeT< agx::UInt32 > * seedAttribute
#define AGX_TYPE_BINDING(_Type, _Name)
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
#define AGXPHYSICS_EXPORT
Entity instance provides access to a single instance in an EntityStorage.
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr & geometry()
#define AGX_DECLARE_POINTER_TYPES(type)
bool isInstanceOf(agxData::EntityModel *model) const
Representation of a name string.
AGXPHYSICS_EXPORT agx::Vec3 & velocity()
static agxData::ScalarAttributeT< agx::Name > * nameAttribute
Spawns new bodys inside a given volume.
Type-specific Array used for fast access into the data held by a Buffer.
Pointer to a entity instance of type Physics.CollisionGroupSet.
AGXPHYSICS_EXPORT agx::Emitter *& model()
Vector containing 'raw' data.
EntityPtr & operator=(const EntityPtr &other)=default
AGXPHYSICS_EXPORT agx::Physics::CollisionGroupSetPtr & collisionGroupSet()
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
agxData::EntityRef< EmitterPtr > EmitterRef
Pointer to a entity instance of type Physics.Geometry.
static agxData::ScalarAttributeT< agx::Physics::CollisionGroupSetPtr > * collisionGroupSetAttribute
Pointer to a entity instance of type Physics.Emitter.
Contains classes for low level data storage for AGX.
static agxData::ScalarAttributeT< agx::Real > * emittedQuantityAttribute
Abstract description of the data attributes for the Physics.Emitter entity.
static agxData::ScalarAttributeT< agx::UInt > * emittedCountAttribute
static agxData::ScalarAttributeT< agx::Real > * emittedQuantityMaximumAttribute
Abstract description of the data attributes for the Referenced entity.
AGXPHYSICS_EXPORT agx::UInt & emittedCount()
bool isInstanceOf(agxData::EntityModel *model) const
EmitterInstance InstanceType
static agxData::ScalarAttributeT< agx::Physics::GeometryPtr > * geometryAttribute
static agxData::PointerAttributeT< agx::Emitter * > * modelAttribute
static agxData::ScalarAttributeT< agx::Real > * rateAttribute
Pointer to a entity instance of type Referenced.
static agxData::ScalarAttributeT< agx::Vec3 > * velocityAttribute
#define DOXYGEN_END_INTERNAL_BLOCK()
AGXPHYSICS_EXPORT agx::Real & emittedQuantity()
#define DOXYGEN_START_INTERNAL_BLOCK()
static EmitterModel * instance()
AGXPHYSICS_EXPORT agx::Name & name()
AGXPHYSICS_EXPORT EmitterPtr()