21 #ifndef GENERATED_AGX_PHYSICS_SOLVEMATERIAL_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_SOLVEMATERIAL_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 )
56 class SolveMaterialModel;
57 class SolveMaterialData;
58 class SolveMaterialPtr;
59 class SolveMaterialInstance;
60 class SolveMaterialSemantics;
96 virtual void configure(agx::TiXmlElement* eEntity)
override;
104 #ifndef AGX_PHYSICS_SOLVEMATERIAL_DATA_SET_OVERRIDE
105 #define AGX_PHYSICS_SOLVEMATERIAL_DATA_SET
109 SolveMaterialInstance operator[] (
size_t index);
125 virtual ~SolveMaterialData() {}
126 virtual void setNumElements(
agx::Index numElements)
override;
129 SolveMaterialData& operator= (
const SolveMaterialData&) {
return *
this; }
142 agx::Real const& getAdhesiveImpulse()
const;
148 void setAdhesiveImpulse(
agx::Real const& value);
149 void setFriction(
agx::Vec2 const& value);
153 friend class SolveMaterialPtr;
154 friend class SolveMaterialInstance;
155 SolveMaterialSemantics();
199 #ifdef AGX_GENERATED_TOLUA_WRAPPER
200 inline agx::Real const& getAdhesiveImpulse()
const {
return (*this)->getAdhesiveImpulse(); }
201 inline agx::Vec2 const& getFriction()
const {
return (*this)->getFriction(); }
204 inline void setAdhesiveImpulse(
agx::Real const& value) { (*this)->setAdhesiveImpulse(value); }
205 inline void setFriction(
agx::Vec2 const& value) { (*this)->setFriction(value); }
216 SolveMaterialInstance();
217 SolveMaterialInstance(SolveMaterialData* data,
agx::Index index);
222 SolveMaterialData* getData();
223 const SolveMaterialData* getData()
const;
229 agx::Real const& adhesiveImpulse()
const;
250 inline SolveMaterialInstance
agx::Physics::SolveMaterialData::operator[] (
size_t index) {
return SolveMaterialInstance(
this, (
agx::Index)index); }
257 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
264 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
272 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
281 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
288 AGX_FORCE_INLINE SolveMaterialSemantics* SolveMaterialPtr::operator->() {
return (SolveMaterialSemantics* )
this; }
289 AGX_FORCE_INLINE const SolveMaterialSemantics* SolveMaterialPtr::operator->()
const {
return (
const SolveMaterialSemantics* )
this; }
293 AGX_FORCE_INLINE agx::Real& SolveMaterialPtr::adhesiveImpulse() { verifyIndex();
return getData()->adhesiveImpulse[calculateIndex()]; }
294 AGX_FORCE_INLINE agx::Real const& SolveMaterialPtr::adhesiveImpulse()
const { verifyIndex();
return getData()->adhesiveImpulse[calculateIndex()]; }
296 AGX_FORCE_INLINE agx::Vec2& SolveMaterialPtr::friction() { verifyIndex();
return getData()->friction[calculateIndex()]; }
297 AGX_FORCE_INLINE agx::Vec2 const& SolveMaterialPtr::friction()
const { verifyIndex();
return getData()->friction[calculateIndex()]; }
306 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
313 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
321 AGX_FORCE_INLINE agx::Real& SolveMaterialInstance::adhesiveImpulse() { verifyIndex();
return getData()->adhesiveImpulse[getIndex()]; }
322 AGX_FORCE_INLINE agx::Real const& SolveMaterialInstance::adhesiveImpulse()
const { verifyIndex();
return getData()->adhesiveImpulse[getIndex()]; }
325 AGX_FORCE_INLINE agx::Vec2 const& SolveMaterialInstance::friction()
const { verifyIndex();
return getData()->friction[getIndex()]; }
338 # pragma warning(pop)
341 #undef AGX_ENTITY_WRAPPER
342 #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.SolveMaterial entity.
virtual void construct(agxData::EntityPtr instance) override
virtual ~SolveMaterialModel()
virtual void initAttributeAccessors() override
static agxData::EntityStorage * defaultStorage()
static SolveMaterialPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
void construct(agx::Physics::SolveMaterialPtr solveMaterial)
static agxData::ScalarAttributeT< agx::Vec2 > * frictionAttribute
static SolveMaterialModel * instance()
virtual void configure(agx::TiXmlElement *eEntity) override
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
SolveMaterialModel(const agx::String &name="SolveMaterial")
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::ScalarAttributeT< agx::Real > * adhesiveImpulseAttribute
Pointer to a entity instance of type Physics.SolveMaterial.
SolveMaterialData DataType
AGXPHYSICS_EXPORT SolveMaterialPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT const SolveMaterialInstance instance() const
AGXPHYSICS_EXPORT agx::Real & adhesiveImpulse()
AGXPHYSICS_EXPORT SolveMaterialSemantics * operator->()
AGXPHYSICS_EXPORT SolveMaterialInstance instance()
SolveMaterialInstance InstanceType
AGXPHYSICS_EXPORT const SolveMaterialSemantics * operator->() const
AGXPHYSICS_EXPORT SolveMaterialPtr()
SolveMaterialModel ModelType
SolveMaterialData * getData()
AGXPHYSICS_EXPORT agx::Vec2 & friction()
AGXPHYSICS_EXPORT agx::Real const & adhesiveImpulse() const
AGXPHYSICS_EXPORT SolveMaterialPtr(agxData::EntityStorage *storage, agx::Index id)
const SolveMaterialData * getData() const
AGXPHYSICS_EXPORT SolveMaterialPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Vec2 const & friction() const
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())