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;
92 virtual void shutdownCleanup()
override;
107 virtual void configure(agx::TiXmlElement* eEntity)
override;
108 virtual void initAttributeAccessors()
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;
210 MaterialData* getData();
211 const MaterialData* getData()
const;
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