21 #ifndef GENERATED_AGX_PHYSICS_PARTICLE_H_PLUGIN 22 #define GENERATED_AGX_PHYSICS_PARTICLE_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 namespace agx {
namespace Physics {
class MaterialPtr; }}
58 namespace agx {
namespace Physics {
class CollisionGroupSetPtr; }}
59 namespace agx {
namespace Physics {
class GraphNodePtr; }}
69 class ParticleInstance;
70 class ParticleSemantics;
95 virtual void shutdownCleanup()
override;
131 virtual void configure(agx::TiXmlElement* eEntity)
override;
132 virtual void initAttributeAccessors()
override;
139 #ifndef AGX_PHYSICS_PARTICLE_DATA_SET_OVERRIDE 140 #define AGX_PHYSICS_PARTICLE_DATA_SET 144 ParticleInstance operator[] (
size_t index);
177 typedef agx::ParticleState stateType;
202 typedef agx::Vec3 geometryContactVectorType;
210 virtual ~ParticleData() {}
211 virtual void setNumElements(
agx::Index numElements)
override;
212 virtual void synchronizeSharedAttribute(
agxData::Value* value)
override;
215 ParticleData& operator= (
const ParticleData&) {
return *
this; }
228 agx::ParticleState
const& getState()
const;
238 agx::Uuid const& getMaterialUuid()
const;
248 agx::Vec3 const& getGeometryContactVector()
const;
252 void integrate(
const agx::Real& clock_timeStep);
253 void integratePosition(
const agx::Real& clock_timeStep);
254 void integrateVelocity(
const agx::Real& clock_timeStep);
258 void setPosition(
const agx::Vec3& position);
260 void setVelocity(
const agx::Vec3& velocity);
263 void setState(agx::ParticleState
const& value);
264 void setOldVelocity(
agx::Vec3 const& value);
268 void setMaterialUuid(
agx::Uuid const& value);
274 void setGeometryContactList(
agx::UInt32 const& value);
277 void setGeometryContactVector(
agx::Vec3 const& value);
283 friend class ParticleInstance;
312 ParticleData* getData();
313 const ParticleData* getData()
const;
459 ParticleInstance(ParticleData* data,
agx::Index index);
464 ParticleData* getData();
465 const ParticleData* getData()
const;
469 agx::ParticleState& state();
471 agx::ParticleState
const& state()
const;
596 agx::Vec3 const& geometryContactVector()
const;
617 inline ParticleInstance
agx::Physics::ParticleData::operator[] (
size_t index) {
return ParticleInstance(
this, (
agx::Index)index); }
624 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
631 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
639 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
648 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
748 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
755 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
763 AGX_FORCE_INLINE agx::ParticleState& ParticleInstance::state() { verifyIndex();
return getData()->state[getIndex()]; }
764 AGX_FORCE_INLINE agx::ParticleState
const& ParticleInstance::state()
const { verifyIndex();
return getData()->state[getIndex()]; }
767 AGX_FORCE_INLINE agx::Real const& ParticleInstance::defaultRadius()
const { verifyIndex();
return getData()->defaultRadius; }
770 AGX_FORCE_INLINE agx::Real const& ParticleInstance::defaultMass()
const { verifyIndex();
return getData()->defaultMass; }
779 AGX_FORCE_INLINE agx::Real const& ParticleInstance::defaultInvMass()
const { verifyIndex();
return getData()->defaultInvMass; }
782 AGX_FORCE_INLINE agx::Vec3 const& ParticleInstance::position()
const { verifyIndex();
return getData()->position[getIndex()]; }
785 AGX_FORCE_INLINE agx::Vec3 const& ParticleInstance::velocity()
const { verifyIndex();
return getData()->velocity[getIndex()]; }
787 AGX_FORCE_INLINE agx::Vec3& ParticleInstance::oldVelocity() { verifyIndex();
return getData()->oldVelocity[getIndex()]; }
788 AGX_FORCE_INLINE agx::Vec3 const& ParticleInstance::oldVelocity()
const { verifyIndex();
return getData()->oldVelocity[getIndex()]; }
791 AGX_FORCE_INLINE agx::Vec3 const& ParticleInstance::force()
const { verifyIndex();
return getData()->force[getIndex()]; }
797 AGX_FORCE_INLINE agx::Real const& ParticleInstance::radius()
const { verifyIndex();
return getData()->radius[getIndex()]; }
803 AGX_FORCE_INLINE agx::Real const& ParticleInstance::invMass()
const { verifyIndex();
return getData()->invMass[getIndex()]; }
808 AGX_FORCE_INLINE agx::Uuid& ParticleInstance::materialUuid() { verifyIndex();
return getData()->materialUuid[getIndex()]; }
809 AGX_FORCE_INLINE agx::Uuid const& ParticleInstance::materialUuid()
const { verifyIndex();
return getData()->materialUuid[getIndex()]; }
818 AGX_FORCE_INLINE agx::UInt32 const& ParticleInstance::cellIndex()
const { verifyIndex();
return getData()->cellIndex[getIndex()]; }
826 AGX_FORCE_INLINE agx::UInt32& ParticleInstance::geometryContactList() { verifyIndex();
return getData()->geometryContactList[getIndex()]; }
827 AGX_FORCE_INLINE agx::UInt32 const& ParticleInstance::geometryContactList()
const { verifyIndex();
return getData()->geometryContactList[getIndex()]; }
830 AGX_FORCE_INLINE agx::UInt32 const& ParticleInstance::solveBodyIndex()
const { verifyIndex();
return getData()->solveBodyIndex[getIndex()]; }
838 AGX_FORCE_INLINE agx::Vec3& ParticleInstance::geometryContactVector() { verifyIndex();
return getData()->geometryContactVector[getIndex()]; }
839 AGX_FORCE_INLINE agx::Vec3 const& ParticleInstance::geometryContactVector()
const { verifyIndex();
return getData()->geometryContactVector[getIndex()]; }
841 AGX_FORCE_INLINE agx::Real32& ParticleInstance::enableRendering() { verifyIndex();
return getData()->enableRendering[getIndex()]; }
842 AGX_FORCE_INLINE agx::Real32 const& ParticleInstance::enableRendering()
const { verifyIndex();
return getData()->enableRendering[getIndex()]; }
852 AGX_TYPE_BINDING(agx::Physics::ParticleInstance,
"Physics.ParticleInstance")
855 # pragma warning(pop) 858 #undef AGX_ENTITY_WRAPPER 859 #undef AGX_ENTITY_NAMESPACE static agxData::ScalarAttributeT< agx::UInt8 > * tierAttribute
AGXPHYSICS_EXPORT agx::ParticleState & state()
static agxData::ScalarAttributeT< agx::Uuid > * materialUuidAttribute
static agxData::ScalarAttributeT< agx::Vec3 > * geometryContactVectorAttribute
static agxData::ScalarAttributeT< agx::Vec4f > * colorAttribute
agxData::EntityData * getData()
static agxData::ScalarAttributeT< agx::UInt32 > * oldCellAttribute
static agxData::SharedAttributeT< agx::Physics::CollisionGroupSetPtr > * defaultCollisionGroupSetAttribute
AGXPHYSICS_EXPORT agx::Vec3 & force()
agxData::EntityInstance instance()
AGXPHYSICS_EXPORT agx::UInt32 & oldCell()
AGXPHYSICS_EXPORT agx::Real & radius()
static agxData::SharedAttributeT< agx::Real > * defaultRadiusAttribute
static agxData::ScalarAttributeT< agx::UInt16 > * cellSlotAttribute
Data storage for a collection of entity instances of a specified EntityModel.
static agxData::ScalarAttributeT< agx::Real > * massAttribute
Abstract representation of a value.
Pointer to a entity instance of type Physics.Material.
#define agxAssertN(expr, format,...)
A class holding 4 dimensional vectors and providing basic arithmetic.
agxData::EntityData * getData()
agx::String fullPath() const
#define AGX_TYPE_BINDING(_Type, _Name)
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
static agxData::SharedAttributeT< agx::Physics::MaterialPtr > * defaultMaterialAttribute
#define AGXPHYSICS_EXPORT
AGXPHYSICS_EXPORT agx::Uuid & materialUuid()
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 ParticleSemantics * operator->()
AGXPHYSICS_EXPORT ParticlePtr()
AGXPHYSICS_EXPORT agx::Physics::GraphNodePtr & graphNode()
#define AGX_DECLARE_POINTER_TYPES(type)
bool isInstanceOf(agxData::EntityModel *model) const
AGXPHYSICS_EXPORT agx::Physics::MaterialPtr & material()
static agxData::SharedAttributeT< agx::Real > * defaultInvMassAttribute
AGXPHYSICS_EXPORT agx::Physics::CollisionGroupSetPtr & defaultCollisionGroupSet()
static agxData::ScalarAttributeT< agx::Physics::GraphNodePtr > * graphNodeAttribute
AGXPHYSICS_EXPORT agx::Vec3 & position()
Type-specific Array used for fast access into the data held by a Buffer.
AGXPHYSICS_EXPORT agx::Real & defaultRadius()
static agxData::ScalarAttributeT< agx::Vec3 > * forceAttribute
Pointer to a entity instance of type Physics.CollisionGroupSet.
AGXPHYSICS_EXPORT agx::Vec4f & color()
AGXPHYSICS_EXPORT ParticleInstance instance()
AGXPHYSICS_EXPORT agx::Physics::MaterialPtr & defaultMaterial()
Vector containing 'raw' data.
EntityPtr & operator=(const EntityPtr &other)=default
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
static agxData::ScalarAttributeT< agx::Vec3 > * oldVelocityAttribute
Abstract description of the data attributes for the Physics.Particle entity.
Pointer to a entity instance of type Physics.GraphNode.
static agxData::ScalarAttributeT< agx::Real > * invMassAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * geometryContactListAttribute
AGXPHYSICS_EXPORT agx::Real & defaultInvMass()
static agxData::ScalarAttributeT< agx::Physics::MaterialPtr > * materialAttribute
AGXPHYSICS_EXPORT agx::Vec3 & oldVelocity()
AGXPHYSICS_EXPORT ParticlePtr & operator=(const agxData::EntityPtr &ptr)
static agxData::ScalarAttributeT< agx::Vec3 > * positionAttribute
Contains classes for low level data storage for AGX.
AGXPHYSICS_EXPORT agx::Vec3 & velocity()
AGXPHYSICS_EXPORT agx::Real & mass()
AGXPHYSICS_EXPORT agx::Real & defaultMass()
AGXPHYSICS_EXPORT agx::Real & invMass()
AGXPHYSICS_EXPORT agx::UInt8 & tier()
static agxData::ScalarAttributeT< agx::Real32 > * enableRenderingAttribute
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
ParticleInstance InstanceType
static agxData::ScalarAttributeT< agx::UInt32 > * cellIndexAttribute
static agxData::ScalarAttributeT< agx::Real > * radiusAttribute
static agxData::SharedAttributeT< agx::Real > * defaultMassAttribute
A UUID, or Universally unique identifier, is intended to uniquely identify information in a distribut...
bool isInstanceOf(agxData::EntityModel *model) const
AGXPHYSICS_EXPORT agx::UInt32 & geometryContactList()
static agxData::ScalarAttributeT< agx::Vec3 > * velocityAttribute
AGXPHYSICS_EXPORT agx::UInt32 & solveBodyIndex()
static ParticleModel * instance()
AGXPHYSICS_EXPORT agx::UInt32 & cellIndex()
static agxData::ScalarAttributeT< agx::Real > * lifeAttribute
AGXPHYSICS_EXPORT agx::Real & life()
static agxData::ScalarAttributeT< agx::Physics::CollisionGroupSetPtr > * collisionGroupSetAttribute
AGXPHYSICS_EXPORT agx::Physics::CollisionGroupSetPtr & collisionGroupSet()
AGXPHYSICS_EXPORT agx::Real32 & enableRendering()
Pointer to a entity instance of type Physics.Particle.
static agxData::ScalarAttributeT< agx::ParticleState > * stateAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * solveBodyIndexAttribute
#define DOXYGEN_END_INTERNAL_BLOCK()
AGXPHYSICS_EXPORT agx::UInt16 & cellSlot()
#define DOXYGEN_START_INTERNAL_BLOCK()
AGXPHYSICS_EXPORT agx::Vec3 & geometryContactVector()