21#ifndef GENERATED_AGX_PHYSICS_SURFACEMATERIAL_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_SURFACEMATERIAL_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 )
57 class SurfaceMaterialModel;
58 class SurfaceMaterialData;
59 class SurfaceMaterialPtr;
60 class SurfaceMaterialInstance;
61 class SurfaceMaterialSemantics;
101 virtual void configure(agx::TiXmlElement* eEntity)
override;
109 #ifndef AGX_PHYSICS_SURFACEMATERIAL_DATA_SET_OVERRIDE
110 #define AGX_PHYSICS_SURFACEMATERIAL_DATA_SET
114 SurfaceMaterialInstance operator[] (
size_t index);
135 SurfaceMaterialData();
138 virtual ~SurfaceMaterialData() {}
139 virtual void setNumElements(
agx::Index numElements)
override;
142 SurfaceMaterialData& operator= (
const SurfaceMaterialData&) {
return *
this; }
157 agx::Real const& getAdhesiveOverlap()
const;
159 agx::Bool const& getFrictionEnabled()
const;
166 void setAdhesion(
agx::Real const& value);
167 void setAdhesiveOverlap(
agx::Real const& value);
168 void setViscosity(
agx::Real const& value);
169 void setFrictionEnabled(
agx::Bool const& value);
174 friend class SurfaceMaterialPtr;
175 friend class SurfaceMaterialInstance;
176 SurfaceMaterialSemantics();
248 SurfaceMaterialInstance();
249 SurfaceMaterialInstance(SurfaceMaterialData* data,
agx::Index index);
254 SurfaceMaterialData* getData();
255 const SurfaceMaterialData* getData()
const;
271 agx::Real const& adhesiveOverlap()
const;
281 agx::Bool const& frictionEnabled()
const;
302 inline SurfaceMaterialInstance
agx::Physics::SurfaceMaterialData::operator[] (
size_t index) {
return SurfaceMaterialInstance(
this, (
agx::Index)index); }
309 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
316 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
324 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
325 EntityPtr::getModel()->fullPath().c_str(), SurfaceMaterialModel::instance()->fullPath().c_str());
333 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
334 EntityPtr::getModel()->fullPath().c_str(), SurfaceMaterialModel::instance()->fullPath().c_str());
340 AGX_FORCE_INLINE SurfaceMaterialSemantics* SurfaceMaterialPtr::operator->() {
return (SurfaceMaterialSemantics* )
this; }
341 AGX_FORCE_INLINE const SurfaceMaterialSemantics* SurfaceMaterialPtr::operator->()
const {
return (
const SurfaceMaterialSemantics* )
this; }
345 AGX_FORCE_INLINE agx::Real& SurfaceMaterialPtr::roughness() { verifyIndex();
return getData()->roughness[calculateIndex()]; }
346 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialPtr::roughness()
const { verifyIndex();
return getData()->roughness[calculateIndex()]; }
348 AGX_FORCE_INLINE agx::Real& SurfaceMaterialPtr::adhesion() { verifyIndex();
return getData()->adhesion[calculateIndex()]; }
349 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialPtr::adhesion()
const { verifyIndex();
return getData()->adhesion[calculateIndex()]; }
351 AGX_FORCE_INLINE agx::Real& SurfaceMaterialPtr::adhesiveOverlap() { verifyIndex();
return getData()->adhesiveOverlap[calculateIndex()]; }
352 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialPtr::adhesiveOverlap()
const { verifyIndex();
return getData()->adhesiveOverlap[calculateIndex()]; }
354 AGX_FORCE_INLINE agx::Real& SurfaceMaterialPtr::viscosity() { verifyIndex();
return getData()->viscosity[calculateIndex()]; }
355 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialPtr::viscosity()
const { verifyIndex();
return getData()->viscosity[calculateIndex()]; }
357 AGX_FORCE_INLINE agx::Bool& SurfaceMaterialPtr::frictionEnabled() { verifyIndex();
return getData()->frictionEnabled[calculateIndex()]; }
358 AGX_FORCE_INLINE agx::Bool const& SurfaceMaterialPtr::frictionEnabled()
const { verifyIndex();
return getData()->frictionEnabled[calculateIndex()]; }
361 AGX_FORCE_INLINE agx::Bool const& SurfaceMaterialPtr::dirty()
const { verifyIndex();
return getData()->dirty[calculateIndex()]; }
365 AGX_FORCE_INLINE SurfaceMaterialInstance::SurfaceMaterialInstance(SurfaceMaterialData* data,
agx::Index index) :
agx::ReferencedInstance(data, index) {}
370 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
377 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
385 AGX_FORCE_INLINE agx::Real& SurfaceMaterialInstance::roughness() { verifyIndex();
return getData()->roughness[getIndex()]; }
386 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialInstance::roughness()
const { verifyIndex();
return getData()->roughness[getIndex()]; }
388 AGX_FORCE_INLINE agx::Real& SurfaceMaterialInstance::adhesion() { verifyIndex();
return getData()->adhesion[getIndex()]; }
389 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialInstance::adhesion()
const { verifyIndex();
return getData()->adhesion[getIndex()]; }
391 AGX_FORCE_INLINE agx::Real& SurfaceMaterialInstance::adhesiveOverlap() { verifyIndex();
return getData()->adhesiveOverlap[getIndex()]; }
392 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialInstance::adhesiveOverlap()
const { verifyIndex();
return getData()->adhesiveOverlap[getIndex()]; }
394 AGX_FORCE_INLINE agx::Real& SurfaceMaterialInstance::viscosity() { verifyIndex();
return getData()->viscosity[getIndex()]; }
395 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialInstance::viscosity()
const { verifyIndex();
return getData()->viscosity[getIndex()]; }
397 AGX_FORCE_INLINE agx::Bool& SurfaceMaterialInstance::frictionEnabled() { verifyIndex();
return getData()->frictionEnabled[getIndex()]; }
398 AGX_FORCE_INLINE agx::Bool const& SurfaceMaterialInstance::frictionEnabled()
const { verifyIndex();
return getData()->frictionEnabled[getIndex()]; }
401 AGX_FORCE_INLINE agx::Bool const& SurfaceMaterialInstance::dirty()
const { verifyIndex();
return getData()->dirty[getIndex()]; }
417#undef AGX_ENTITY_WRAPPER
418#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()
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.SurfaceMaterial entity.
static agxData::EntityStorage * defaultStorage()
virtual ~SurfaceMaterialModel()
void construct(agx::Physics::SurfaceMaterialPtr surfaceMaterial)
static agxData::ScalarAttributeT< agx::Real > * viscosityAttribute
static agxData::ScalarAttributeT< agx::Bool > * dirtyAttribute
static agxData::ScalarAttributeT< agx::Real > * adhesionAttribute
SurfaceMaterialModel(const agx::String &name="SurfaceMaterial")
static SurfaceMaterialModel * instance()
virtual void initAttributeAccessors() override
virtual void construct(agxData::EntityPtr instance) override
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
static SurfaceMaterialPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
virtual void configure(agx::TiXmlElement *eEntity) override
static agxData::ScalarAttributeT< agx::Bool > * frictionEnabledAttribute
static agxData::ScalarAttributeT< agx::Real > * adhesiveOverlapAttribute
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::ScalarAttributeT< agx::Real > * roughnessAttribute
Pointer to a entity instance of type Physics.SurfaceMaterial.
AGXPHYSICS_EXPORT const SurfaceMaterialInstance instance() const
AGXPHYSICS_EXPORT SurfaceMaterialInstance instance()
AGXPHYSICS_EXPORT agx::Real & adhesion()
SurfaceMaterialModel ModelType
SurfaceMaterialInstance InstanceType
AGXPHYSICS_EXPORT agx::Real & viscosity()
SurfaceMaterialData DataType
AGXPHYSICS_EXPORT SurfaceMaterialSemantics * operator->()
AGXPHYSICS_EXPORT agx::Real const & viscosity() const
AGXPHYSICS_EXPORT agx::Bool & dirty()
AGXPHYSICS_EXPORT agx::Real & adhesiveOverlap()
AGXPHYSICS_EXPORT agx::Bool & frictionEnabled()
AGXPHYSICS_EXPORT agx::Bool const & frictionEnabled() const
AGXPHYSICS_EXPORT const SurfaceMaterialSemantics * operator->() const
AGXPHYSICS_EXPORT SurfaceMaterialPtr(const agxData::EntityInstance &instance)
SurfaceMaterialData * getData()
const SurfaceMaterialData * getData() const
AGXPHYSICS_EXPORT agx::Real const & roughness() const
AGXPHYSICS_EXPORT agx::Real const & adhesiveOverlap() const
AGXPHYSICS_EXPORT agx::Real & roughness()
AGXPHYSICS_EXPORT SurfaceMaterialPtr()
AGXPHYSICS_EXPORT agx::Bool const & dirty() const
AGXPHYSICS_EXPORT agx::Real const & adhesion() const
AGXPHYSICS_EXPORT SurfaceMaterialPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT SurfaceMaterialPtr(const agxData::EntityPtr &ptr)
Abstract description of the data attributes for the Referenced entity.
Pointer to a entity instance of type Referenced.
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.
AGXOSG_EXPORT void setRoughness(osg::Node *node, float roughness, bool override=false)
Set the roughness of the material.
agxData::EntityRef< SurfaceMaterialPtr > SurfaceMaterialRef
The agx namespace contains the dynamics/math part of the AGX Dynamics API.