21#ifndef GENERATED_AGX_PHYSICS_SOLVEMATERIAL_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_SOLVEMATERIAL_H_PLUGIN
24#define AGX_ENTITY_WRAPPER 1
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;
97 virtual void configure(agx::TiXmlElement* eEntity)
override;
105 #ifndef AGX_PHYSICS_SOLVEMATERIAL_DATA_SET_OVERRIDE
106 #define AGX_PHYSICS_SOLVEMATERIAL_DATA_SET
110 SolveMaterialInstance operator[] (
size_t index);
121 typedef agx::Vec2 tangentialCohesionImpulseType;
128 virtual ~SolveMaterialData() {}
129 virtual void setNumElements(
agx::Index numElements)
override;
132 SolveMaterialData& operator= (
const SolveMaterialData&) {
return *
this; }
145 agx::Real const& getAdhesiveImpulse()
const;
147 agx::Vec2 const& getTangentialCohesionImpulse()
const;
152 void setAdhesiveImpulse(
agx::Real const& value);
153 void setFriction(
agx::Vec2 const& value);
154 void setTangentialCohesionImpulse(
agx::Vec2 const& value);
158 friend class SolveMaterialPtr;
159 friend class SolveMaterialInstance;
160 SolveMaterialSemantics();
214 SolveMaterialInstance();
215 SolveMaterialInstance(SolveMaterialData* data,
agx::Index index);
220 SolveMaterialData* getData();
221 const SolveMaterialData* getData()
const;
227 agx::Real const& adhesiveImpulse()
const;
237 agx::Vec2 const& tangentialCohesionImpulse()
const;
253 inline SolveMaterialInstance
agx::Physics::SolveMaterialData::operator[] (
size_t index) {
return SolveMaterialInstance(
this, (
agx::Index)index); }
260 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
267 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
275 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
276 EntityPtr::getModel()->fullPath().c_str(), SolveMaterialModel::instance()->fullPath().c_str());
284 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
285 EntityPtr::getModel()->fullPath().c_str(), SolveMaterialModel::instance()->fullPath().c_str());
291 AGX_FORCE_INLINE SolveMaterialSemantics* SolveMaterialPtr::operator->() {
return (SolveMaterialSemantics* )
this; }
292 AGX_FORCE_INLINE const SolveMaterialSemantics* SolveMaterialPtr::operator->()
const {
return (
const SolveMaterialSemantics* )
this; }
296 AGX_FORCE_INLINE agx::Real& SolveMaterialPtr::adhesiveImpulse() { verifyIndex();
return getData()->adhesiveImpulse[calculateIndex()]; }
297 AGX_FORCE_INLINE agx::Real const& SolveMaterialPtr::adhesiveImpulse()
const { verifyIndex();
return getData()->adhesiveImpulse[calculateIndex()]; }
299 AGX_FORCE_INLINE agx::Vec2& SolveMaterialPtr::friction() { verifyIndex();
return getData()->friction[calculateIndex()]; }
300 AGX_FORCE_INLINE agx::Vec2 const& SolveMaterialPtr::friction()
const { verifyIndex();
return getData()->friction[calculateIndex()]; }
302 AGX_FORCE_INLINE agx::Vec2& SolveMaterialPtr::tangentialCohesionImpulse() { verifyIndex();
return getData()->tangentialCohesionImpulse[calculateIndex()]; }
303 AGX_FORCE_INLINE agx::Vec2 const& SolveMaterialPtr::tangentialCohesionImpulse()
const { verifyIndex();
return getData()->tangentialCohesionImpulse[calculateIndex()]; }
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 AGX_FORCE_INLINE agx::Real& SolveMaterialInstance::adhesiveImpulse() { verifyIndex();
return getData()->adhesiveImpulse[getIndex()]; }
328 AGX_FORCE_INLINE agx::Real const& SolveMaterialInstance::adhesiveImpulse()
const { verifyIndex();
return getData()->adhesiveImpulse[getIndex()]; }
331 AGX_FORCE_INLINE agx::Vec2 const& SolveMaterialInstance::friction()
const { verifyIndex();
return getData()->friction[getIndex()]; }
333 AGX_FORCE_INLINE agx::Vec2& SolveMaterialInstance::tangentialCohesionImpulse() { verifyIndex();
return getData()->tangentialCohesionImpulse[getIndex()]; }
334 AGX_FORCE_INLINE agx::Vec2 const& SolveMaterialInstance::tangentialCohesionImpulse()
const { verifyIndex();
return getData()->tangentialCohesionImpulse[getIndex()]; }
350#undef AGX_ENTITY_WRAPPER
351#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...
EntityPtr & operator=(const EntityPtr &other)=default
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
agxData::EntityInstance instance()
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.
static SolveMaterialModel * instance()
virtual void construct(agxData::EntityPtr instance) override
virtual ~SolveMaterialModel()
virtual void initAttributeAccessors() override
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
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
virtual void configure(agx::TiXmlElement *eEntity) override
static agxData::ScalarAttributeT< agx::Vec2 > * tangentialCohesionImpulseAttribute
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
SolveMaterialModel(const agx::String &name="SolveMaterial")
static agxData::EntityStorage * defaultStorage()
static agxData::ScalarAttributeT< agx::Real > * adhesiveImpulseAttribute
Pointer to a entity instance of type Physics.SolveMaterial.
const SolveMaterialData * getData() const
SolveMaterialData DataType
AGXPHYSICS_EXPORT SolveMaterialPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT const SolveMaterialInstance instance() const
AGXPHYSICS_EXPORT SolveMaterialSemantics * operator->()
AGXPHYSICS_EXPORT agx::Real const & adhesiveImpulse() const
AGXPHYSICS_EXPORT SolveMaterialInstance instance()
AGXPHYSICS_EXPORT agx::Vec2 & friction()
AGXPHYSICS_EXPORT agx::Vec2 & tangentialCohesionImpulse()
SolveMaterialInstance InstanceType
AGXPHYSICS_EXPORT SolveMaterialPtr()
SolveMaterialModel ModelType
AGXPHYSICS_EXPORT agx::Vec2 const & tangentialCohesionImpulse() const
AGXPHYSICS_EXPORT agx::Real & adhesiveImpulse()
AGXPHYSICS_EXPORT const SolveMaterialSemantics * operator->() const
SolveMaterialData * getData()
AGXPHYSICS_EXPORT SolveMaterialPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agx::Vec2 const & friction() const
AGXPHYSICS_EXPORT SolveMaterialPtr(const agxData::EntityPtr &ptr)
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.