21 #ifndef GENERATED_AGX_PHYSICS_MATERIAL_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_MATERIAL_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 )
52 namespace agx {
class Material; }
54 namespace agx {
namespace Physics {
class BulkMaterialPtr; }}
55 namespace agx {
namespace Physics {
class SurfaceMaterialPtr; }}
56 namespace agx {
namespace Physics {
class WireMaterialPtr; }}
66 class MaterialInstance;
67 class MaterialSemantics;
107 virtual void configure(agx::TiXmlElement* eEntity)
override;
115 #ifndef AGX_PHYSICS_MATERIAL_DATA_SET_OVERRIDE
116 #define AGX_PHYSICS_MATERIAL_DATA_SET
120 MaterialInstance operator[] (
size_t index);
134 typedef agx::Name materialLibraryNameType;
144 virtual ~MaterialData() {}
145 virtual void setNumElements(
agx::Index numElements)
override;
148 MaterialData& operator= (
const MaterialData&) {
return *
this; }
163 agx::Name const& getMaterialLibraryName()
const;
173 void setMaterialLibraryName(
agx::Name const& value);
180 friend class MaterialPtr;
181 friend class MaterialInstance;
246 #ifdef AGX_GENERATED_TOLUA_WRAPPER
248 inline agx::Name const& getName()
const {
return (*this)->getName(); }
249 inline agx::Name const& getMaterialLibraryName()
const {
return (*this)->getMaterialLibraryName(); }
255 inline void setModel(
agx::Material*
const& value) { (*this)->setModel(value); }
256 inline void setName(
agx::Name const& value) { (*this)->setName(value); }
257 inline void setMaterialLibraryName(
agx::Name const& value) { (*this)->setMaterialLibraryName(value); }
275 MaterialInstance(MaterialData* data,
agx::Index index);
280 MaterialData* getData();
281 const MaterialData* getData()
const;
297 agx::Name const& materialLibraryName()
const;
328 inline MaterialInstance
agx::Physics::MaterialData::operator[] (
size_t index) {
return MaterialInstance(
this, (
agx::Index)index); }
335 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
342 "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\'",
359 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
366 AGX_FORCE_INLINE MaterialSemantics* MaterialPtr::operator->() {
return (MaterialSemantics* )
this; }
367 AGX_FORCE_INLINE const MaterialSemantics* MaterialPtr::operator->()
const {
return (
const MaterialSemantics* )
this; }
377 AGX_FORCE_INLINE agx::Name& MaterialPtr::materialLibraryName() { verifyIndex();
return getData()->materialLibraryName[calculateIndex()]; }
378 AGX_FORCE_INLINE agx::Name const& MaterialPtr::materialLibraryName()
const { verifyIndex();
return getData()->materialLibraryName[calculateIndex()]; }
396 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
403 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
417 AGX_FORCE_INLINE agx::Name& MaterialInstance::materialLibraryName() { verifyIndex();
return getData()->materialLibraryName[getIndex()]; }
418 AGX_FORCE_INLINE agx::Name const& MaterialInstance::materialLibraryName()
const { verifyIndex();
return getData()->materialLibraryName[getIndex()]; }
440 # pragma warning(pop)
443 #undef AGX_ENTITY_WRAPPER
444 #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.
Main material class which acts as a holder of a Surface Material and a Bulk material.
agx::String fullPath() const
Representation of a name string.
Pointer to a entity instance of type Physics.BulkMaterial.
Abstract description of the data attributes for the Physics.Material entity.
static MaterialModel * instance()
static agxData::ScalarAttributeT< agx::Physics::WireMaterialPtr > * wireMaterialAttribute
MaterialModel(const agx::String &name="Material")
static MaterialPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
virtual void construct(agxData::EntityPtr instance) override
static agxData::EntityStorage * defaultStorage()
virtual void configure(agx::TiXmlElement *eEntity) override
static agxData::PointerAttributeT< agx::Material * > * modelAttribute
void construct(agx::Physics::MaterialPtr material)
static agxData::ScalarAttributeT< agx::Name > * nameAttribute
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::ScalarAttributeT< agx::Physics::SurfaceMaterialPtr > * surfaceMaterialAttribute
static agxData::ScalarAttributeT< agx::Name > * materialLibraryNameAttribute
static agxData::ScalarAttributeT< agx::Physics::BulkMaterialPtr > * bulkMaterialAttribute
virtual void initAttributeAccessors() override
Pointer to a entity instance of type Physics.Material.
AGXPHYSICS_EXPORT MaterialPtr()
AGXPHYSICS_EXPORT agx::Name & materialLibraryName()
AGXPHYSICS_EXPORT const MaterialInstance instance() const
AGXPHYSICS_EXPORT agx::Physics::WireMaterialPtr const & wireMaterial() const
AGXPHYSICS_EXPORT MaterialPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agx::Material *const & model() const
AGXPHYSICS_EXPORT MaterialSemantics * operator->()
AGXPHYSICS_EXPORT const MaterialSemantics * operator->() const
AGXPHYSICS_EXPORT agx::Name & name()
AGXPHYSICS_EXPORT agx::Name const & name() const
AGXPHYSICS_EXPORT agx::Physics::BulkMaterialPtr & bulkMaterial()
AGXPHYSICS_EXPORT agx::Physics::WireMaterialPtr & wireMaterial()
AGXPHYSICS_EXPORT MaterialPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Physics::BulkMaterialPtr const & bulkMaterial() const
AGXPHYSICS_EXPORT MaterialInstance instance()
const MaterialData * getData() const
AGXPHYSICS_EXPORT agx::Material *& model()
MaterialInstance InstanceType
AGXPHYSICS_EXPORT agx::Name const & materialLibraryName() const
AGXPHYSICS_EXPORT MaterialPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::Physics::SurfaceMaterialPtr const & surfaceMaterial() const
AGXPHYSICS_EXPORT agx::Physics::SurfaceMaterialPtr & surfaceMaterial()
Pointer to a entity instance of type Physics.SurfaceMaterial.
Pointer to a entity instance of type Physics.WireMaterial.
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< MaterialPtr > MaterialRef
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())