21 #ifndef GENERATED_AGX_PHYSICS_SOLVEBODY_H_PLUGIN 22 #define GENERATED_AGX_PHYSICS_SOLVEBODY_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 ) 60 class SolveBodyInstance;
61 class SolveBodySemantics;
86 virtual void shutdownCleanup()
override;
102 virtual void configure(agx::TiXmlElement* eEntity)
override;
103 virtual void initAttributeAccessors()
override;
110 #ifndef AGX_PHYSICS_SOLVEBODY_DATA_SET_OVERRIDE 111 #define AGX_PHYSICS_SOLVEBODY_DATA_SET 115 SolveBodyInstance operator[] (
size_t index);
131 typedef agx::Vec3 oldAngularVelocityType;
141 virtual ~SolveBodyData() {}
142 virtual void setNumElements(
agx::Index numElements)
override;
145 SolveBodyData& operator= (
const SolveBodyData&) {
return *
this; }
159 agx::Vec3 const& getAngularVelocity()
const;
161 agx::Vec3 const& getOldAngularVelocity()
const;
169 void setVelocity(
agx::Vec3 const& value);
170 void setAngularVelocity(
agx::Vec3 const& value);
171 void setOldVelocity(
agx::Vec3 const& value);
172 void setOldAngularVelocity(
agx::Vec3 const& value);
174 void setInvInertia(
agx::Real const& value);
180 friend class SolveBodyInstance;
181 SolveBodySemantics();
209 SolveBodyData* getData();
210 const SolveBodyData* getData()
const;
250 #ifdef AGX_GENERATED_TOLUA_WRAPPER 251 inline agx::Vec3 const& getVelocity()
const {
return (*this)->getVelocity(); }
252 inline agx::Vec3 const& getAngularVelocity()
const {
return (*this)->getAngularVelocity(); }
253 inline agx::Vec3 const& getOldVelocity()
const {
return (*this)->getOldVelocity(); }
254 inline agx::Vec3 const& getOldAngularVelocity()
const {
return (*this)->getOldAngularVelocity(); }
255 inline agx::Real const& getInvMass()
const {
return (*this)->getInvMass(); }
256 inline agx::Real const& getInvInertia()
const {
return (*this)->getInvInertia(); }
257 inline agx::SpinMutex const& getSolveMutex()
const {
return (*this)->getSolveMutex(); }
260 inline void setVelocity(
agx::Vec3 const& value) { (*this)->setVelocity(value); }
261 inline void setAngularVelocity(
agx::Vec3 const& value) { (*this)->setAngularVelocity(value); }
262 inline void setOldVelocity(
agx::Vec3 const& value) { (*this)->setOldVelocity(value); }
263 inline void setOldAngularVelocity(
agx::Vec3 const& value) { (*this)->setOldAngularVelocity(value); }
264 inline void setInvMass(
agx::Real const& value) { (*this)->setInvMass(value); }
265 inline void setInvInertia(
agx::Real const& value) { (*this)->setInvInertia(value); }
266 inline void setSolveMutex(
agx::SpinMutex const& value) { (*this)->setSolveMutex(value); }
278 SolveBodyInstance(SolveBodyData* data,
agx::Index index);
283 SolveBodyData* getData();
284 const SolveBodyData* getData()
const;
295 agx::Vec3 const& angularVelocity()
const;
305 agx::Vec3 const& oldAngularVelocity()
const;
336 inline SolveBodyInstance
agx::Physics::SolveBodyData::operator[] (
size_t index) {
return SolveBodyInstance(
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\'",
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& SolveBodyInstance::velocity()
const { verifyIndex();
return getData()->velocity[getIndex()]; }
425 AGX_FORCE_INLINE agx::Vec3& SolveBodyInstance::angularVelocity() { verifyIndex();
return getData()->angularVelocity[getIndex()]; }
426 AGX_FORCE_INLINE agx::Vec3 const& SolveBodyInstance::angularVelocity()
const { verifyIndex();
return getData()->angularVelocity[getIndex()]; }
428 AGX_FORCE_INLINE agx::Vec3& SolveBodyInstance::oldVelocity() { verifyIndex();
return getData()->oldVelocity[getIndex()]; }
429 AGX_FORCE_INLINE agx::Vec3 const& SolveBodyInstance::oldVelocity()
const { verifyIndex();
return getData()->oldVelocity[getIndex()]; }
431 AGX_FORCE_INLINE agx::Vec3& SolveBodyInstance::oldAngularVelocity() { verifyIndex();
return getData()->oldAngularVelocity[getIndex()]; }
432 AGX_FORCE_INLINE agx::Vec3 const& SolveBodyInstance::oldAngularVelocity()
const { verifyIndex();
return getData()->oldAngularVelocity[getIndex()]; }
435 AGX_FORCE_INLINE agx::Real const& SolveBodyInstance::invMass()
const { verifyIndex();
return getData()->invMass[getIndex()]; }
438 AGX_FORCE_INLINE agx::Real const& SolveBodyInstance::invInertia()
const { verifyIndex();
return getData()->invInertia[getIndex()]; }
451 AGX_TYPE_BINDING(agx::Physics::SolveBodyInstance,
"Physics.SolveBodyInstance")
454 # pragma warning(pop) 457 #undef AGX_ENTITY_WRAPPER 458 #undef AGX_ENTITY_NAMESPACE AGXPHYSICS_EXPORT agx::SpinMutex & solveMutex()
Abstract description of the data attributes for the Physics.SolveBody entity.
agxData::EntityData * getData()
agxData::EntityInstance instance()
Data storage for a collection of entity instances of a specified EntityModel.
#define agxAssertN(expr, format,...)
agxData::EntityData * getData()
agx::String fullPath() const
#define AGX_TYPE_BINDING(_Type, _Name)
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
AGXPHYSICS_EXPORT SolveBodyPtr & operator=(const agxData::EntityPtr &ptr)
SolveBodyInstance InstanceType
#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
static agxData::ScalarAttributeT< agx::Real > * invInertiaAttribute
static agxData::ScalarAttributeT< agx::SpinMutex > * solveMutexAttribute
AGXPHYSICS_EXPORT agx::Vec3 & oldVelocity()
Type-specific Array used for fast access into the data held by a Buffer.
Vector containing 'raw' data.
EntityPtr & operator=(const EntityPtr &other)=default
SolveBodyData * getData()
AGXPHYSICS_EXPORT SolveBodyPtr()
Namespace agx contains the dynamics/math part of the AGX Dynamics API.
AGXPHYSICS_EXPORT agx::Real & invInertia()
Contains classes for low level data storage for AGX.
static agxData::ScalarAttributeT< agx::Vec3 > * velocityAttribute
AGXPHYSICS_EXPORT agx::Vec3 & oldAngularVelocity()
AGXPHYSICS_EXPORT agx::Real & invMass()
Pointer to a entity instance of type Physics.SolveBody.
AGXPHYSICS_EXPORT agx::Vec3 & angularVelocity()
static agxData::ScalarAttributeT< agx::Vec3 > * oldAngularVelocityAttribute
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
bool isInstanceOf(agxData::EntityModel *model) const
static agxData::ScalarAttributeT< agx::Real > * invMassAttribute
AGXPHYSICS_EXPORT SolveBodySemantics * operator->()
static agxData::ScalarAttributeT< agx::Vec3 > * angularVelocityAttribute
#define DOXYGEN_END_INTERNAL_BLOCK()
AGXPHYSICS_EXPORT agx::Vec3 & velocity()
static agxData::ScalarAttributeT< agx::Vec3 > * oldVelocityAttribute
#define DOXYGEN_START_INTERNAL_BLOCK()
AGXPHYSICS_EXPORT SolveBodyInstance instance()
static SolveBodyModel * instance()