21#ifndef GENERATED_AGX_PHYSICS_SOLVEPARTICLE_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_SOLVEPARTICLE_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 )
57 class SolveParticleModel;
58 class SolveParticleData;
59 class SolveParticlePtr;
60 class SolveParticleInstance;
61 class SolveParticleSemantics;
102 virtual void configure(agx::TiXmlElement* eEntity)
override;
110 #ifndef AGX_PHYSICS_SOLVEPARTICLE_DATA_SET_OVERRIDE
111 #define AGX_PHYSICS_SOLVEPARTICLE_DATA_SET
115 SolveParticleInstance operator[] (
size_t index);
141 virtual ~SolveParticleData() {}
142 virtual void setNumElements(
agx::Index numElements)
override;
145 SolveParticleData& operator= (
const SolveParticleData&) {
return *
this; }
169 void setPosition(
agx::Vec3 const& value);
170 void setVelocity(
agx::Vec3 const& value);
179 friend class SolveParticlePtr;
180 friend class SolveParticleInstance;
181 SolveParticleSemantics();
255 SolveParticleInstance();
256 SolveParticleInstance(SolveParticleData* data,
agx::Index index);
261 SolveParticleData* getData();
262 const SolveParticleData* getData()
const;
314 inline SolveParticleInstance
agx::Physics::SolveParticleData::operator[] (
size_t index) {
return SolveParticleInstance(
this, (
agx::Index)index); }
321 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
328 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
336 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
337 EntityPtr::getModel()->fullPath().c_str(), SolveParticleModel::instance()->fullPath().c_str());
345 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
346 EntityPtr::getModel()->fullPath().c_str(), SolveParticleModel::instance()->fullPath().c_str());
352 AGX_FORCE_INLINE SolveParticleSemantics* SolveParticlePtr::operator->() {
return (SolveParticleSemantics* )
this; }
353 AGX_FORCE_INLINE const SolveParticleSemantics* SolveParticlePtr::operator->()
const {
return (
const SolveParticleSemantics* )
this; }
357 AGX_FORCE_INLINE agx::Vec3& SolveParticlePtr::position() { verifyIndex();
return getData()->position[calculateIndex()]; }
358 AGX_FORCE_INLINE agx::Vec3 const& SolveParticlePtr::position()
const { verifyIndex();
return getData()->position[calculateIndex()]; }
360 AGX_FORCE_INLINE agx::Vec3& SolveParticlePtr::velocity() { verifyIndex();
return getData()->velocity[calculateIndex()]; }
361 AGX_FORCE_INLINE agx::Vec3 const& SolveParticlePtr::velocity()
const { verifyIndex();
return getData()->velocity[calculateIndex()]; }
364 AGX_FORCE_INLINE agx::Vec3 const& SolveParticlePtr::force()
const { verifyIndex();
return getData()->force[calculateIndex()]; }
367 AGX_FORCE_INLINE agx::Real const& SolveParticlePtr::density()
const { verifyIndex();
return getData()->density[calculateIndex()]; }
370 AGX_FORCE_INLINE agx::UInt32 const& SolveParticlePtr::sourceIndex()
const { verifyIndex();
return getData()->sourceIndex[calculateIndex()]; }
373 AGX_FORCE_INLINE agx::UInt32 const& SolveParticlePtr::solveIndex()
const { verifyIndex();
return getData()->solveIndex[calculateIndex()]; }
385 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
392 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
401 AGX_FORCE_INLINE agx::Vec3 const& SolveParticleInstance::position()
const { verifyIndex();
return getData()->position[getIndex()]; }
404 AGX_FORCE_INLINE agx::Vec3 const& SolveParticleInstance::velocity()
const { verifyIndex();
return getData()->velocity[getIndex()]; }
407 AGX_FORCE_INLINE agx::Vec3 const& SolveParticleInstance::force()
const { verifyIndex();
return getData()->force[getIndex()]; }
410 AGX_FORCE_INLINE agx::Real const& SolveParticleInstance::density()
const { verifyIndex();
return getData()->density[getIndex()]; }
413 AGX_FORCE_INLINE agx::UInt32 const& SolveParticleInstance::sourceIndex()
const { verifyIndex();
return getData()->sourceIndex[getIndex()]; }
416 AGX_FORCE_INLINE agx::UInt32 const& SolveParticleInstance::solveIndex()
const { verifyIndex();
return getData()->solveIndex[getIndex()]; }
435#undef AGX_ENTITY_WRAPPER
436#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()
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
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()
Data storage for a collection of entity instances of a specified EntityModel.
agx::String fullPath() const
Abstract description of the data attributes for the Physics.SolveParticle entity.
virtual void construct(agxData::EntityPtr instance) override
SolveParticleModel(const agx::String &name="SolveParticle")
static agxData::ScalarAttributeT< agx::UInt32 > * solveIndexAttribute
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
virtual void initAttributeAccessors() override
static SolveParticleModel * instance()
static agxData::ScalarAttributeT< agx::UInt32 > * sourceIndexAttribute
static agxData::ScalarAttributeT< agx::Vec3 > * forceAttribute
void construct(agx::Physics::SolveParticlePtr solveParticle)
static agxData::EntityStorage * defaultStorage()
virtual void configure(agx::TiXmlElement *eEntity) override
virtual ~SolveParticleModel()
static SolveParticlePtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static agxData::ArrayAttributeT< agx::UInt32 > * contactListAttribute
static agxData::ScalarAttributeT< agx::Vec3 > * positionAttribute
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
static agxData::ScalarAttributeT< agx::Vec3 > * velocityAttribute
static agxData::ScalarAttributeT< agx::Real > * densityAttribute
Pointer to a entity instance of type Physics.SolveParticle.
AGXPHYSICS_EXPORT agx::UInt32 & sourceIndex()
AGXPHYSICS_EXPORT agx::Vec3 const & velocity() const
AGXPHYSICS_EXPORT const SolveParticleSemantics * operator->() const
AGXPHYSICS_EXPORT agx::Real & density()
AGXPHYSICS_EXPORT agx::Vec3 const & force() const
AGXPHYSICS_EXPORT SolveParticlePtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT const SolveParticleInstance instance() const
AGXPHYSICS_EXPORT agx::UInt32 & solveIndex()
AGXPHYSICS_EXPORT agx::Vec3 const & position() const
AGXPHYSICS_EXPORT SolveParticlePtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT SolveParticlePtr()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > & contactList()
AGXPHYSICS_EXPORT agx::UInt32 const & sourceIndex() const
AGXPHYSICS_EXPORT agx::Vec3 & velocity()
AGXPHYSICS_EXPORT SolveParticleInstance instance()
AGXPHYSICS_EXPORT agx::UInt32 const & solveIndex() const
AGXPHYSICS_EXPORT agx::Vec3 & position()
const SolveParticleData * getData() const
SolveParticleData * getData()
AGXPHYSICS_EXPORT SolveParticleSemantics * operator->()
AGXPHYSICS_EXPORT SolveParticlePtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Real const & density() const
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const & contactList() const
AGXPHYSICS_EXPORT agx::Vec3 & force()
SolveParticleModel ModelType
SolveParticleData DataType
SolveParticleInstance InstanceType
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.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.