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;
297 #ifdef AGX_GENERATED_TOLUA_WRAPPER 298 inline agx::UInt32 const& getId()
const {
return (*this)->getId(); }
299 inline agx::Name const& getName()
const {
return (*this)->getName(); }
302 inline agx::Vec3 const& getVelocity()
const {
return (*this)->getVelocity(); }
303 inline agx::Real const& getRate()
const {
return (*this)->getRate(); }
304 inline agx::Real const& getEmittedQuantity()
const {
return (*this)->getEmittedQuantity(); }
305 inline agx::Real const& getEmittedQuantityMaximum()
const {
return (*this)->getEmittedQuantityMaximum(); }
306 inline agx::UInt const& getEmittedCount()
const {
return (*this)->getEmittedCount(); }
307 inline agx::UInt32 const& getSeed()
const {
return (*this)->getSeed(); }
312 inline void setName(
agx::Name const& value) { (*this)->setName(value); }
315 inline void setVelocity(
agx::Vec3 const& value) { (*this)->setVelocity(value); }
316 inline void setRate(
agx::Real const& value) { (*this)->setRate(value); }
317 inline void setEmittedQuantity(
agx::Real const& value) { (*this)->setEmittedQuantity(value); }
318 inline void setEmittedQuantityMaximum(
agx::Real const& value) { (*this)->setEmittedQuantityMaximum(value); }
319 inline void setEmittedCount(
agx::UInt const& value) { (*this)->setEmittedCount(value); }
320 inline void setSeed(
agx::UInt32 const& value) { (*this)->setSeed(value); }
321 inline void setModel(
agx::Emitter*
const& value) { (*this)->setModel(value); }
336 EmitterInstance(EmitterData* data,
agx::Index index);
341 EmitterData* getData();
342 const EmitterData* getData()
const;
378 agx::Real const& emittedQuantity()
const;
383 agx::Real const& emittedQuantityMaximum()
const;
414 inline EmitterInstance
agx::Physics::EmitterData::operator[] (
size_t index) {
return EmitterInstance(
this, (
agx::Index)index); }
421 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
428 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
436 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
445 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
492 AGX_FORCE_INLINE EmitterInstance::EmitterInstance(EmitterData* data,
agx::Index index) : agx::ReferencedInstance(data, index) {}
497 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
504 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
525 AGX_FORCE_INLINE agx::Vec3 const& EmitterInstance::velocity()
const { verifyIndex();
return getData()->velocity[getIndex()]; }
530 AGX_FORCE_INLINE agx::Real& EmitterInstance::emittedQuantity() { verifyIndex();
return getData()->emittedQuantity[getIndex()]; }
531 AGX_FORCE_INLINE agx::Real const& EmitterInstance::emittedQuantity()
const { verifyIndex();
return getData()->emittedQuantity[getIndex()]; }
533 AGX_FORCE_INLINE agx::Real& EmitterInstance::emittedQuantityMaximum() { verifyIndex();
return getData()->emittedQuantityMaximum[getIndex()]; }
534 AGX_FORCE_INLINE agx::Real const& EmitterInstance::emittedQuantityMaximum()
const { verifyIndex();
return getData()->emittedQuantityMaximum[getIndex()]; }
536 AGX_FORCE_INLINE agx::UInt& EmitterInstance::emittedCount() { verifyIndex();
return getData()->emittedCount[getIndex()]; }
537 AGX_FORCE_INLINE agx::UInt const& EmitterInstance::emittedCount()
const { verifyIndex();
return getData()->emittedCount[getIndex()]; }
556 # pragma warning(pop) 559 #undef AGX_ENTITY_WRAPPER 560 #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()
Namespace agx 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()