21#ifndef GENERATED_AGX_PHYSICS_EMITTER_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_EMITTER_H_PLUGIN
24#define AGX_ENTITY_WRAPPER 1
30# pragma warning( disable : 4505 )
32# pragma warning( disable : 4251 )
34# pragma warning( disable : 4355 )
36# pragma warning( disable: 4714 )
54namespace agx {
class Emitter; }
56namespace agx {
namespace Physics {
class GeometryPtr; }}
57namespace 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;
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\'",
407 EntityPtr::getModel()->fullPath().c_str(), EmitterModel::instance()->fullPath().c_str());
415 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
416 EntityPtr::getModel()->fullPath().c_str(), EmitterModel::instance()->fullPath().c_str());
422 AGX_FORCE_INLINE EmitterSemantics* EmitterPtr::operator->() {
return (EmitterSemantics* )
this; }
423 AGX_FORCE_INLINE const EmitterSemantics* EmitterPtr::operator->()
const {
return (
const EmitterSemantics* )
this; }
440 AGX_FORCE_INLINE agx::Vec3 const& EmitterPtr::velocity()
const { verifyIndex();
return getData()->velocity[calculateIndex()]; }
445 AGX_FORCE_INLINE agx::Real& EmitterPtr::emittedQuantity() { verifyIndex();
return getData()->emittedQuantity[calculateIndex()]; }
446 AGX_FORCE_INLINE agx::Real const& EmitterPtr::emittedQuantity()
const { verifyIndex();
return getData()->emittedQuantity[calculateIndex()]; }
448 AGX_FORCE_INLINE agx::Real& EmitterPtr::emittedQuantityMaximum() { verifyIndex();
return getData()->emittedQuantityMaximum[calculateIndex()]; }
449 AGX_FORCE_INLINE agx::Real const& EmitterPtr::emittedQuantityMaximum()
const { verifyIndex();
return getData()->emittedQuantityMaximum[calculateIndex()]; }
451 AGX_FORCE_INLINE agx::UInt& EmitterPtr::emittedCount() { verifyIndex();
return getData()->emittedCount[calculateIndex()]; }
452 AGX_FORCE_INLINE agx::UInt const& EmitterPtr::emittedCount()
const { verifyIndex();
return getData()->emittedCount[calculateIndex()]; }
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()]; }
529#undef AGX_ENTITY_WRAPPER
530#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...
EntityPtr & operator=(const EntityPtr &other)=default
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
agxData::EntityInstance instance()
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.
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 EmitterPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static agxData::EntityStorage * defaultStorage()
static agxData::PointerAttributeT< agx::Emitter * > * modelAttribute
virtual void construct(agxData::EntityPtr instance) override
static agxData::ScalarAttributeT< agx::UInt32 > * seedAttribute
static agxData::ScalarAttributeT< agx::Real > * emittedQuantityAttribute
virtual void configure(agx::TiXmlElement *eEntity) override
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::ScalarAttributeT< agx::Vec3 > * velocityAttribute
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
static EmitterModel * instance()
Pointer to a entity instance of type Physics.Emitter.
AGXPHYSICS_EXPORT EmitterPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT EmitterInstance instance()
AGXPHYSICS_EXPORT agx::Emitter *const & model() const
AGXPHYSICS_EXPORT EmitterPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr & geometry()
AGXPHYSICS_EXPORT EmitterPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agx::Name & name()
AGXPHYSICS_EXPORT agx::Physics::CollisionGroupSetPtr const & collisionGroupSet() const
AGXPHYSICS_EXPORT agx::Real const & emittedQuantityMaximum() const
AGXPHYSICS_EXPORT agx::UInt32 const & id() const
AGXPHYSICS_EXPORT agx::UInt32 & id()
AGXPHYSICS_EXPORT agx::Real & emittedQuantityMaximum()
AGXPHYSICS_EXPORT const EmitterInstance instance() const
AGXPHYSICS_EXPORT agx::Vec3 const & velocity() const
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr const & geometry() const
AGXPHYSICS_EXPORT EmitterPtr()
AGXPHYSICS_EXPORT agx::Real const & emittedQuantity() const
AGXPHYSICS_EXPORT agx::Real & emittedQuantity()
AGXPHYSICS_EXPORT agx::Vec3 & velocity()
AGXPHYSICS_EXPORT const EmitterSemantics * operator->() const
AGXPHYSICS_EXPORT agx::UInt const & emittedCount() const
AGXPHYSICS_EXPORT agx::Physics::CollisionGroupSetPtr & collisionGroupSet()
AGXPHYSICS_EXPORT agx::UInt32 const & seed() const
AGXPHYSICS_EXPORT agx::Real const & rate() const
EmitterInstance InstanceType
AGXPHYSICS_EXPORT agx::UInt32 & seed()
AGXPHYSICS_EXPORT agx::Emitter *& model()
AGXPHYSICS_EXPORT agx::Real & rate()
AGXPHYSICS_EXPORT agx::UInt & emittedCount()
const EmitterData * getData() const
AGXPHYSICS_EXPORT EmitterSemantics * operator->()
AGXPHYSICS_EXPORT agx::Name const & name() 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())