21 #ifndef GENERATED_AGX_PHYSICS_SOLVEPARTICLE_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_SOLVEPARTICLE_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 )
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();
250 #ifdef AGX_GENERATED_TOLUA_WRAPPER
251 inline agx::Vec3 const& getPosition()
const {
return (*this)->getPosition(); }
252 inline agx::Vec3 const& getVelocity()
const {
return (*this)->getVelocity(); }
253 inline agx::Vec3 const& getForce()
const {
return (*this)->getForce(); }
254 inline agx::Real const& getDensity()
const {
return (*this)->getDensity(); }
255 inline agx::UInt32 const& getSourceIndex()
const {
return (*this)->getSourceIndex(); }
256 inline agx::UInt32 const& getSolveIndex()
const {
return (*this)->getSolveIndex(); }
260 inline void setPosition(
agx::Vec3 const& value) { (*this)->setPosition(value); }
261 inline void setVelocity(
agx::Vec3 const& value) { (*this)->setVelocity(value); }
262 inline void setForce(
agx::Vec3 const& value) { (*this)->setForce(value); }
263 inline void setDensity(
agx::Real const& value) { (*this)->setDensity(value); }
264 inline void setSourceIndex(
agx::UInt32 const& value) { (*this)->setSourceIndex(value); }
265 inline void setSolveIndex(
agx::UInt32 const& value) { (*this)->setSolveIndex(value); }
277 SolveParticleInstance();
278 SolveParticleInstance(SolveParticleData* data,
agx::Index index);
283 SolveParticleData* getData();
284 const SolveParticleData* getData()
const;
336 inline SolveParticleInstance
agx::Physics::SolveParticleData::operator[] (
size_t index) {
return SolveParticleInstance(
this, (
agx::Index)index); }
343 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
350 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
358 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
367 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
374 AGX_FORCE_INLINE SolveParticleSemantics* SolveParticlePtr::operator->() {
return (SolveParticleSemantics* )
this; }
375 AGX_FORCE_INLINE const SolveParticleSemantics* SolveParticlePtr::operator->()
const {
return (
const SolveParticleSemantics* )
this; }
379 AGX_FORCE_INLINE agx::Vec3& SolveParticlePtr::position() { verifyIndex();
return getData()->position[calculateIndex()]; }
380 AGX_FORCE_INLINE agx::Vec3 const& SolveParticlePtr::position()
const { verifyIndex();
return getData()->position[calculateIndex()]; }
382 AGX_FORCE_INLINE agx::Vec3& SolveParticlePtr::velocity() { verifyIndex();
return getData()->velocity[calculateIndex()]; }
383 AGX_FORCE_INLINE agx::Vec3 const& SolveParticlePtr::velocity()
const { verifyIndex();
return getData()->velocity[calculateIndex()]; }
386 AGX_FORCE_INLINE agx::Vec3 const& SolveParticlePtr::force()
const { verifyIndex();
return getData()->force[calculateIndex()]; }
389 AGX_FORCE_INLINE agx::Real const& SolveParticlePtr::density()
const { verifyIndex();
return getData()->density[calculateIndex()]; }
392 AGX_FORCE_INLINE agx::UInt32 const& SolveParticlePtr::sourceIndex()
const { verifyIndex();
return getData()->sourceIndex[calculateIndex()]; }
395 AGX_FORCE_INLINE agx::UInt32 const& SolveParticlePtr::solveIndex()
const { verifyIndex();
return getData()->solveIndex[calculateIndex()]; }
407 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
414 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
423 AGX_FORCE_INLINE agx::Vec3 const& SolveParticleInstance::position()
const { verifyIndex();
return getData()->position[getIndex()]; }
426 AGX_FORCE_INLINE agx::Vec3 const& SolveParticleInstance::velocity()
const { verifyIndex();
return getData()->velocity[getIndex()]; }
429 AGX_FORCE_INLINE agx::Vec3 const& SolveParticleInstance::force()
const { verifyIndex();
return getData()->force[getIndex()]; }
432 AGX_FORCE_INLINE agx::Real const& SolveParticleInstance::density()
const { verifyIndex();
return getData()->density[getIndex()]; }
435 AGX_FORCE_INLINE agx::UInt32 const& SolveParticleInstance::sourceIndex()
const { verifyIndex();
return getData()->sourceIndex[getIndex()]; }
438 AGX_FORCE_INLINE agx::UInt32 const& SolveParticleInstance::solveIndex()
const { verifyIndex();
return getData()->solveIndex[getIndex()]; }
454 # pragma warning(pop)
457 #undef AGX_ENTITY_WRAPPER
458 #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...
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
agxData::EntityInstance instance()
EntityPtr & operator=(const EntityPtr &other)=default
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 void initAttributeAccessors() override
static agxData::ScalarAttributeT< agx::UInt32 > * sourceIndexAttribute
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static SolveParticleModel * instance()
static agxData::ScalarAttributeT< agx::Vec3 > * forceAttribute
void construct(agx::Physics::SolveParticlePtr solveParticle)
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::EntityStorage * defaultStorage()
static agxData::ScalarAttributeT< agx::Real > * densityAttribute
Pointer to a entity instance of type Physics.SolveParticle.
AGXPHYSICS_EXPORT agx::Vec3 const & force() const
const SolveParticleData * getData() const
AGXPHYSICS_EXPORT SolveParticlePtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT const SolveParticleInstance instance() const
AGXPHYSICS_EXPORT SolveParticlePtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT SolveParticlePtr()
AGXPHYSICS_EXPORT agx::UInt32 & solveIndex()
AGXPHYSICS_EXPORT agx::UInt32 const & sourceIndex() const
AGXPHYSICS_EXPORT SolveParticleInstance instance()
AGXPHYSICS_EXPORT agx::Vec3 const & position() const
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const & contactList() const
SolveParticleData * getData()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > & contactList()
AGXPHYSICS_EXPORT SolveParticlePtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT const SolveParticleSemantics * operator->() const
AGXPHYSICS_EXPORT agx::UInt32 const & solveIndex() const
AGXPHYSICS_EXPORT agx::Real & density()
AGXPHYSICS_EXPORT SolveParticleSemantics * operator->()
AGXPHYSICS_EXPORT agx::Vec3 const & velocity() const
SolveParticleModel ModelType
SolveParticleData DataType
AGXPHYSICS_EXPORT agx::Vec3 & velocity()
SolveParticleInstance InstanceType
AGXPHYSICS_EXPORT agx::Vec3 & force()
AGXPHYSICS_EXPORT agx::Vec3 & position()
AGXPHYSICS_EXPORT agx::Real const & density() const
AGXPHYSICS_EXPORT agx::UInt32 & sourceIndex()
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.
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())