21 #ifndef GENERATED_AGX_PHYSICS_SURFACEMATERIAL_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_SURFACEMATERIAL_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 )
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;
165 void setRoughness(
agx::Real const& value);
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();
240 #ifdef AGX_GENERATED_TOLUA_WRAPPER
241 inline agx::Real const& getRoughness()
const {
return (*this)->getRoughness(); }
242 inline agx::Real const& getAdhesion()
const {
return (*this)->getAdhesion(); }
243 inline agx::Real const& getAdhesiveOverlap()
const {
return (*this)->getAdhesiveOverlap(); }
244 inline agx::Real const& getViscosity()
const {
return (*this)->getViscosity(); }
245 inline agx::Bool const& getFrictionEnabled()
const {
return (*this)->getFrictionEnabled(); }
246 inline agx::Bool const& getDirty()
const {
return (*this)->getDirty(); }
249 inline void setRoughness(
agx::Real const& value) { (*this)->setRoughness(value); }
250 inline void setAdhesion(
agx::Real const& value) { (*this)->setAdhesion(value); }
251 inline void setAdhesiveOverlap(
agx::Real const& value) { (*this)->setAdhesiveOverlap(value); }
252 inline void setViscosity(
agx::Real const& value) { (*this)->setViscosity(value); }
253 inline void setFrictionEnabled(
agx::Bool const& value) { (*this)->setFrictionEnabled(value); }
254 inline void setDirty(
agx::Bool const& value) { (*this)->setDirty(value); }
268 SurfaceMaterialInstance();
269 SurfaceMaterialInstance(SurfaceMaterialData* data,
agx::Index index);
274 SurfaceMaterialData* getData();
275 const SurfaceMaterialData* getData()
const;
291 agx::Real const& adhesiveOverlap()
const;
301 agx::Bool const& frictionEnabled()
const;
322 inline SurfaceMaterialInstance
agx::Physics::SurfaceMaterialData::operator[] (
size_t index) {
return SurfaceMaterialInstance(
this, (
agx::Index)index); }
329 "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\'",
344 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
353 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
360 AGX_FORCE_INLINE SurfaceMaterialSemantics* SurfaceMaterialPtr::operator->() {
return (SurfaceMaterialSemantics* )
this; }
361 AGX_FORCE_INLINE const SurfaceMaterialSemantics* SurfaceMaterialPtr::operator->()
const {
return (
const SurfaceMaterialSemantics* )
this; }
365 AGX_FORCE_INLINE agx::Real& SurfaceMaterialPtr::roughness() { verifyIndex();
return getData()->roughness[calculateIndex()]; }
366 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialPtr::roughness()
const { verifyIndex();
return getData()->roughness[calculateIndex()]; }
368 AGX_FORCE_INLINE agx::Real& SurfaceMaterialPtr::adhesion() { verifyIndex();
return getData()->adhesion[calculateIndex()]; }
369 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialPtr::adhesion()
const { verifyIndex();
return getData()->adhesion[calculateIndex()]; }
371 AGX_FORCE_INLINE agx::Real& SurfaceMaterialPtr::adhesiveOverlap() { verifyIndex();
return getData()->adhesiveOverlap[calculateIndex()]; }
372 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialPtr::adhesiveOverlap()
const { verifyIndex();
return getData()->adhesiveOverlap[calculateIndex()]; }
374 AGX_FORCE_INLINE agx::Real& SurfaceMaterialPtr::viscosity() { verifyIndex();
return getData()->viscosity[calculateIndex()]; }
375 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialPtr::viscosity()
const { verifyIndex();
return getData()->viscosity[calculateIndex()]; }
377 AGX_FORCE_INLINE agx::Bool& SurfaceMaterialPtr::frictionEnabled() { verifyIndex();
return getData()->frictionEnabled[calculateIndex()]; }
378 AGX_FORCE_INLINE agx::Bool const& SurfaceMaterialPtr::frictionEnabled()
const { verifyIndex();
return getData()->frictionEnabled[calculateIndex()]; }
381 AGX_FORCE_INLINE agx::Bool const& SurfaceMaterialPtr::dirty()
const { verifyIndex();
return getData()->dirty[calculateIndex()]; }
385 AGX_FORCE_INLINE SurfaceMaterialInstance::SurfaceMaterialInstance(SurfaceMaterialData* data,
agx::Index index) :
agx::ReferencedInstance(data, index) {}
390 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
397 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
405 AGX_FORCE_INLINE agx::Real& SurfaceMaterialInstance::roughness() { verifyIndex();
return getData()->roughness[getIndex()]; }
406 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialInstance::roughness()
const { verifyIndex();
return getData()->roughness[getIndex()]; }
408 AGX_FORCE_INLINE agx::Real& SurfaceMaterialInstance::adhesion() { verifyIndex();
return getData()->adhesion[getIndex()]; }
409 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialInstance::adhesion()
const { verifyIndex();
return getData()->adhesion[getIndex()]; }
411 AGX_FORCE_INLINE agx::Real& SurfaceMaterialInstance::adhesiveOverlap() { verifyIndex();
return getData()->adhesiveOverlap[getIndex()]; }
412 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialInstance::adhesiveOverlap()
const { verifyIndex();
return getData()->adhesiveOverlap[getIndex()]; }
414 AGX_FORCE_INLINE agx::Real& SurfaceMaterialInstance::viscosity() { verifyIndex();
return getData()->viscosity[getIndex()]; }
415 AGX_FORCE_INLINE agx::Real const& SurfaceMaterialInstance::viscosity()
const { verifyIndex();
return getData()->viscosity[getIndex()]; }
417 AGX_FORCE_INLINE agx::Bool& SurfaceMaterialInstance::frictionEnabled() { verifyIndex();
return getData()->frictionEnabled[getIndex()]; }
418 AGX_FORCE_INLINE agx::Bool const& SurfaceMaterialInstance::frictionEnabled()
const { verifyIndex();
return getData()->frictionEnabled[getIndex()]; }
421 AGX_FORCE_INLINE agx::Bool const& SurfaceMaterialInstance::dirty()
const { verifyIndex();
return getData()->dirty[getIndex()]; }
434 # pragma warning(pop)
437 #undef AGX_ENTITY_WRAPPER
438 #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...
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.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
static SurfaceMaterialModel * instance()
SurfaceMaterialModel(const agx::String &name="SurfaceMaterial")
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 agxData::EntityData * createData(agxData::EntityStorage *storage) override
virtual void configure(agx::TiXmlElement *eEntity) override
static agxData::ScalarAttributeT< agx::Bool > * frictionEnabledAttribute
static agxData::ScalarAttributeT< agx::Real > * adhesiveOverlapAttribute
static agxData::ScalarAttributeT< agx::Real > * roughnessAttribute
Pointer to a entity instance of type Physics.SurfaceMaterial.
AGXPHYSICS_EXPORT const SurfaceMaterialInstance instance() const
AGXPHYSICS_EXPORT agx::Real & roughness()
const SurfaceMaterialData * getData() const
AGXPHYSICS_EXPORT SurfaceMaterialInstance instance()
SurfaceMaterialModel ModelType
AGXPHYSICS_EXPORT SurfaceMaterialSemantics * operator->()
SurfaceMaterialInstance InstanceType
SurfaceMaterialData DataType
AGXPHYSICS_EXPORT agx::Real & adhesion()
SurfaceMaterialData * getData()
AGXPHYSICS_EXPORT agx::Bool & dirty()
AGXPHYSICS_EXPORT agx::Real & viscosity()
AGXPHYSICS_EXPORT const SurfaceMaterialSemantics * operator->() const
AGXPHYSICS_EXPORT agx::Real & adhesiveOverlap()
AGXPHYSICS_EXPORT agx::Real const & viscosity() const
AGXPHYSICS_EXPORT SurfaceMaterialPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::Real const & adhesion() const
AGXPHYSICS_EXPORT agx::Bool const & dirty() const
AGXPHYSICS_EXPORT SurfaceMaterialPtr()
AGXPHYSICS_EXPORT agx::Bool & frictionEnabled()
AGXPHYSICS_EXPORT agx::Real const & adhesiveOverlap() const
AGXPHYSICS_EXPORT agx::Bool const & frictionEnabled() const
AGXPHYSICS_EXPORT SurfaceMaterialPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT SurfaceMaterialPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Real const & roughness() const
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.
agxData::EntityRef< SurfaceMaterialPtr > SurfaceMaterialRef
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())