21 #ifndef GENERATED_AGX_PHYSICS_GRANULARBODY_H_PLUGIN 22 #define GENERATED_AGX_PHYSICS_GRANULARBODY_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 ) 58 class GranularBodyModel;
59 class GranularBodyData;
60 class GranularBodyPtr;
61 class GranularBodyInstance;
62 class GranularBodySemantics;
87 virtual void shutdownCleanup()
override;
102 virtual void configure(agx::TiXmlElement* eEntity)
override;
103 virtual void initAttributeAccessors()
override;
110 #ifndef AGX_PHYSICS_GRANULARBODY_DATA_SET_OVERRIDE 111 #define AGX_PHYSICS_GRANULARBODY_DATA_SET 115 GranularBodyInstance operator[] (
size_t index);
128 typedef agx::Vec3 oldAngularVelocityType;
139 virtual ~GranularBodyData() {}
140 virtual void setNumElements(
agx::Index numElements)
override;
143 GranularBodyData& operator= (
const GranularBodyData&) {
return *
this; }
156 agx::Vec3 const& getAngularVelocity()
const;
157 agx::Vec3 const& getOldAngularVelocity()
const;
164 void integratePosition(
const agx::Real& clock_timeStep);
165 void integrateVelocity(
const agx::Real& clock_timeStep);
166 void setAngularVelocity(
const agx::Vec3& angularVelocity);
172 void setOldAngularVelocity(
agx::Vec3 const& value);
173 void setRotation(
agx::Quat const& value);
176 void setInvInertia(
agx::Real const& value);
181 friend class GranularBodyInstance;
182 GranularBodySemantics();
210 GranularBodyData* getData();
211 const GranularBodyData* getData()
const;
251 GranularBodyInstance();
252 GranularBodyInstance(GranularBodyData* data,
agx::Index index);
257 GranularBodyData* getData();
258 const GranularBodyData* getData()
const;
264 agx::Vec3 const& angularVelocity()
const;
269 agx::Vec3 const& oldAngularVelocity()
const;
305 inline GranularBodyInstance
agx::Physics::GranularBodyData::operator[] (
size_t index) {
return GranularBodyInstance(
this, (
agx::Index)index); }
312 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
319 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
327 "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\'",
368 AGX_FORCE_INLINE GranularBodyInstance::GranularBodyInstance(GranularBodyData* data,
agx::Index index) : agx::Physics::ParticleInstance(data, index) {}
373 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
380 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
388 AGX_FORCE_INLINE agx::Vec3& GranularBodyInstance::angularVelocity() { verifyIndex();
return getData()->angularVelocity[getIndex()]; }
389 AGX_FORCE_INLINE agx::Vec3 const& GranularBodyInstance::angularVelocity()
const { verifyIndex();
return getData()->angularVelocity[getIndex()]; }
391 AGX_FORCE_INLINE agx::Vec3& GranularBodyInstance::oldAngularVelocity() { verifyIndex();
return getData()->oldAngularVelocity[getIndex()]; }
392 AGX_FORCE_INLINE agx::Vec3 const& GranularBodyInstance::oldAngularVelocity()
const { verifyIndex();
return getData()->oldAngularVelocity[getIndex()]; }
395 AGX_FORCE_INLINE agx::Quat const& GranularBodyInstance::rotation()
const { verifyIndex();
return getData()->rotation[getIndex()]; }
398 AGX_FORCE_INLINE agx::Vec3 const& GranularBodyInstance::torque()
const { verifyIndex();
return getData()->torque[getIndex()]; }
401 AGX_FORCE_INLINE agx::Real const& GranularBodyInstance::inertia()
const { verifyIndex();
return getData()->inertia[getIndex()]; }
403 AGX_FORCE_INLINE agx::Real& GranularBodyInstance::invInertia() { verifyIndex();
return getData()->invInertia[getIndex()]; }
404 AGX_FORCE_INLINE agx::Real const& GranularBodyInstance::invInertia()
const { verifyIndex();
return getData()->invInertia[getIndex()]; }
414 AGX_TYPE_BINDING(agx::Physics::GranularBodyInstance,
"Physics.GranularBodyInstance")
417 # pragma warning(pop) 420 #undef AGX_ENTITY_WRAPPER 421 #undef AGX_ENTITY_NAMESPACE AGXPHYSICS_EXPORT agx::Quat & rotation()
GranularBodyData * getData()
Abstract description of the data attributes for the Physics.GranularBody entity.
agxData::EntityData * getData()
static agxData::ScalarAttributeT< agx::Real > * invInertiaAttribute
static agxData::ScalarAttributeT< agx::Vec3 > * angularVelocityAttribute
agxData::EntityInstance instance()
Data storage for a collection of entity instances of a specified EntityModel.
GranularBodyModel ModelType
Pointer to a entity instance of type Physics.GranularBody.
Pointer to a entity instance of type Physics.Material.
#define agxAssertN(expr, format,...)
agxData::EntityData * getData()
agx::String fullPath() const
static GranularBodyModel * instance()
static agxData::ScalarAttributeT< agx::Quat > * rotationAttribute
#define AGX_TYPE_BINDING(_Type, _Name)
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
#define AGXPHYSICS_EXPORT
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...
#define AGX_DECLARE_POINTER_TYPES(type)
bool isInstanceOf(agxData::EntityModel *model) const
AGXPHYSICS_EXPORT agx::Vec3 & angularVelocity()
static agxData::ScalarAttributeT< agx::Real > * inertiaAttribute
Type-specific Array used for fast access into the data held by a Buffer.
static agxData::ScalarAttributeT< agx::Vec3 > * torqueAttribute
AGXPHYSICS_EXPORT agx::Vec3 & oldAngularVelocity()
Vector containing 'raw' data.
EntityPtr & operator=(const EntityPtr &other)=default
static agxData::ScalarAttributeT< agx::Vec3 > * oldAngularVelocityAttribute
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AGXPHYSICS_EXPORT agx::Vec3 & torque()
Abstract description of the data attributes for the Physics.Particle entity.
Contains classes for low level data storage for AGX.
AGXPHYSICS_EXPORT agx::Real & inertia()
GranularBodyData DataType
AGXPHYSICS_EXPORT GranularBodySemantics * operator->()
bool isInstanceOf(agxData::EntityModel *model) const
AGXPHYSICS_EXPORT GranularBodyInstance instance()
AGXPHYSICS_EXPORT agx::Real & invInertia()
AGXPHYSICS_EXPORT GranularBodyPtr()
AGXPHYSICS_EXPORT GranularBodyPtr & operator=(const agxData::EntityPtr &ptr)
Pointer to a entity instance of type Physics.Particle.
GranularBodyInstance InstanceType
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()