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;
113 virtual void configure(agx::TiXmlElement* eEntity)
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);
206 friend class EmitterPtr;
207 friend class EmitterInstance;
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\'",
452 AGX_FORCE_INLINE EmitterSemantics* EmitterPtr::operator->() {
return (EmitterSemantics* )
this; }
453 AGX_FORCE_INLINE const EmitterSemantics* EmitterPtr::operator->()
const {
return (
const EmitterSemantics* )
this; }
470 AGX_FORCE_INLINE agx::Vec3 const& EmitterPtr::velocity()
const { verifyIndex();
return getData()->velocity[calculateIndex()]; }
475 AGX_FORCE_INLINE agx::Real& EmitterPtr::emittedQuantity() { verifyIndex();
return getData()->emittedQuantity[calculateIndex()]; }
476 AGX_FORCE_INLINE agx::Real const& EmitterPtr::emittedQuantity()
const { verifyIndex();
return getData()->emittedQuantity[calculateIndex()]; }
478 AGX_FORCE_INLINE agx::Real& EmitterPtr::emittedQuantityMaximum() { verifyIndex();
return getData()->emittedQuantityMaximum[calculateIndex()]; }
479 AGX_FORCE_INLINE agx::Real const& EmitterPtr::emittedQuantityMaximum()
const { verifyIndex();
return getData()->emittedQuantityMaximum[calculateIndex()]; }
481 AGX_FORCE_INLINE agx::UInt& EmitterPtr::emittedCount() { verifyIndex();
return getData()->emittedCount[calculateIndex()]; }
482 AGX_FORCE_INLINE agx::UInt const& EmitterPtr::emittedCount()
const { verifyIndex();
return getData()->emittedCount[calculateIndex()]; }
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
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGX_TYPE_BINDING(_Type, _Name)
#define AGXPHYSICS_EXPORT
Type-specific Array used for fast access into the data held by a Buffer.
Entity instance provides access to a single instance in an EntityStorage.
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
agxData::EntityInstance instance()
EntityPtr & operator=(const EntityPtr &other)=default
An entity reference is a safe/referencing handle to an entity instance whose model is descendant from...
Data storage for a collection of entity instances of a specified EntityModel.
Spawns new bodys inside a given volume.
agx::String fullPath() const
Representation of a name string.
Pointer to a entity instance of type Physics.CollisionGroupSet.
Abstract description of the data attributes for the Physics.Emitter entity.
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::ScalarAttributeT< agx::Physics::GeometryPtr > * geometryAttribute
static agxData::ScalarAttributeT< agx::Real > * emittedQuantityMaximumAttribute
static agxData::ScalarAttributeT< agx::Physics::CollisionGroupSetPtr > * collisionGroupSetAttribute
void construct(agx::Physics::EmitterPtr emitter)
static agxData::ScalarAttributeT< agx::Name > * nameAttribute
static agxData::ScalarAttributeT< agx::Real > * rateAttribute
virtual void initAttributeAccessors() override
static agxData::ScalarAttributeT< agx::UInt32 > * idAttribute
static agxData::ScalarAttributeT< agx::UInt > * emittedCountAttribute
EmitterModel(const agx::String &name="Emitter")
static EmitterModel * instance()
static EmitterPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static agxData::PointerAttributeT< agx::Emitter * > * modelAttribute
virtual void construct(agxData::EntityPtr instance) override
static agxData::EntityStorage * defaultStorage()
static agxData::ScalarAttributeT< agx::UInt32 > * seedAttribute
static agxData::ScalarAttributeT< agx::Real > * emittedQuantityAttribute
virtual void configure(agx::TiXmlElement *eEntity) override
static agxData::ScalarAttributeT< agx::Vec3 > * velocityAttribute
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
Pointer to a entity instance of type Physics.Emitter.
AGXPHYSICS_EXPORT EmitterPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::Real const & rate() const
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr & geometry()
AGXPHYSICS_EXPORT agx::UInt32 & id()
AGXPHYSICS_EXPORT EmitterInstance instance()
AGXPHYSICS_EXPORT agx::Emitter *const & model() const
AGXPHYSICS_EXPORT agx::UInt const & emittedCount() const
AGXPHYSICS_EXPORT agx::Vec3 const & velocity() const
AGXPHYSICS_EXPORT agx::Name & name()
AGXPHYSICS_EXPORT EmitterPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT EmitterPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agx::Real const & emittedQuantityMaximum() const
AGXPHYSICS_EXPORT agx::Real & emittedQuantityMaximum()
const EmitterData * getData() const
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr const & geometry() const
AGXPHYSICS_EXPORT const EmitterInstance instance() const
AGXPHYSICS_EXPORT EmitterPtr()
AGXPHYSICS_EXPORT const EmitterSemantics * operator->() const
AGXPHYSICS_EXPORT agx::Name const & name() const
AGXPHYSICS_EXPORT agx::UInt32 const & seed() const
AGXPHYSICS_EXPORT agx::UInt32 & seed()
EmitterInstance InstanceType
AGXPHYSICS_EXPORT agx::UInt & emittedCount()
AGXPHYSICS_EXPORT agx::Emitter *& model()
AGXPHYSICS_EXPORT agx::Real & emittedQuantity()
AGXPHYSICS_EXPORT agx::Physics::CollisionGroupSetPtr & collisionGroupSet()
AGXPHYSICS_EXPORT agx::Vec3 & velocity()
AGXPHYSICS_EXPORT agx::UInt32 const & id() const
AGXPHYSICS_EXPORT agx::Real & rate()
AGXPHYSICS_EXPORT EmitterSemantics * operator->()
AGXPHYSICS_EXPORT agx::Physics::CollisionGroupSetPtr const & collisionGroupSet() const
AGXPHYSICS_EXPORT agx::Real const & emittedQuantity() const
Pointer to a entity instance of type Physics.Geometry.
Abstract description of the data attributes for the Referenced entity.
Pointer to a entity instance of type Referenced.
Vector containing 'raw' data.
#define agxAssertN(expr, format,...)
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
Contains classes for low level data storage for AGX.
agxData::EntityRef< EmitterPtr > EmitterRef
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())