21#ifndef GENERATED_AGX_PHYSICS_MATERIAL_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_MATERIAL_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 )
52namespace agx {
class Material; }
54namespace agx {
namespace Physics {
class BulkMaterialPtr; }}
55namespace agx {
namespace Physics {
class SurfaceMaterialPtr; }}
56namespace 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;
255 MaterialInstance(MaterialData* data,
agx::Index index);
260 MaterialData* getData();
261 const MaterialData* getData()
const;
277 agx::Name const& materialLibraryName()
const;
308 inline MaterialInstance
agx::Physics::MaterialData::operator[] (
size_t index) {
return MaterialInstance(
this, (
agx::Index)index); }
315 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
322 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
330 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
331 EntityPtr::getModel()->fullPath().c_str(), MaterialModel::instance()->fullPath().c_str());
339 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
340 EntityPtr::getModel()->fullPath().c_str(), MaterialModel::instance()->fullPath().c_str());
346 AGX_FORCE_INLINE MaterialSemantics* MaterialPtr::operator->() {
return (MaterialSemantics* )
this; }
347 AGX_FORCE_INLINE const MaterialSemantics* MaterialPtr::operator->()
const {
return (
const MaterialSemantics* )
this; }
357 AGX_FORCE_INLINE agx::Name& MaterialPtr::materialLibraryName() { verifyIndex();
return getData()->materialLibraryName[calculateIndex()]; }
358 AGX_FORCE_INLINE agx::Name const& MaterialPtr::materialLibraryName()
const { verifyIndex();
return getData()->materialLibraryName[calculateIndex()]; }
376 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
383 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
397 AGX_FORCE_INLINE agx::Name& MaterialInstance::materialLibraryName() { verifyIndex();
return getData()->materialLibraryName[getIndex()]; }
398 AGX_FORCE_INLINE agx::Name const& MaterialInstance::materialLibraryName()
const { verifyIndex();
return getData()->materialLibraryName[getIndex()]; }
423#undef AGX_ENTITY_WRAPPER
424#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.
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 agxData::ScalarAttributeT< agx::Physics::WireMaterialPtr > * wireMaterialAttribute
static MaterialModel * instance()
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
virtual void configure(agx::TiXmlElement *eEntity) override
static agxData::PointerAttributeT< agx::Material * > * modelAttribute
void construct(agx::Physics::MaterialPtr material)
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::ScalarAttributeT< agx::Name > * nameAttribute
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
static agxData::EntityStorage * defaultStorage()
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 const MaterialInstance instance() const
AGXPHYSICS_EXPORT agx::Name & name()
AGXPHYSICS_EXPORT agx::Name & materialLibraryName()
AGXPHYSICS_EXPORT agx::Physics::BulkMaterialPtr & bulkMaterial()
AGXPHYSICS_EXPORT agx::Physics::WireMaterialPtr & wireMaterial()
AGXPHYSICS_EXPORT MaterialPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agx::Name const & name() const
AGXPHYSICS_EXPORT MaterialPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Physics::SurfaceMaterialPtr const & surfaceMaterial() const
AGXPHYSICS_EXPORT MaterialSemantics * operator->()
AGXPHYSICS_EXPORT MaterialInstance instance()
AGXPHYSICS_EXPORT const MaterialSemantics * operator->() const
AGXPHYSICS_EXPORT agx::Physics::SurfaceMaterialPtr & surfaceMaterial()
AGXPHYSICS_EXPORT agx::Physics::BulkMaterialPtr const & bulkMaterial() const
AGXPHYSICS_EXPORT agx::Material *const & model() const
MaterialInstance InstanceType
const MaterialData * getData() const
AGXPHYSICS_EXPORT agx::Material *& model()
AGXPHYSICS_EXPORT MaterialPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::Name const & materialLibraryName() const
AGXPHYSICS_EXPORT agx::Physics::WireMaterialPtr const & wireMaterial() const
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())