AGXDynamics  2.31.1.0
agx::Physics::MaterialPtr Class Reference

Pointer to a entity instance of type Physics.Material. More...

#include <MaterialEntity.h>

+ Inheritance diagram for agx::Physics::MaterialPtr:

Public Types

typedef MaterialData DataType
 
typedef MaterialInstance InstanceType
 
typedef MaterialModel ModelType
 

Public Member Functions

AGXPHYSICS_EXPORT MaterialPtr ()
 
AGXPHYSICS_EXPORT MaterialPtr (agxData::EntityStorage *storage, agx::Index id)
 
AGXPHYSICS_EXPORT MaterialPtr (const agxData::EntityPtr &ptr)
 
AGXPHYSICS_EXPORT MaterialPtr (const agxData::EntityInstance &instance)
 
AGXPHYSICS_EXPORT agx::Physics::BulkMaterialPtr & bulkMaterial ()
 
AGXPHYSICS_EXPORT agx::Physics::BulkMaterialPtr const & bulkMaterial () const
 
agx::Index calculateIndex () const
 Calculate the index using the indirect id. More...
 
agxData::EntityPtr copy ()
 Create a copy instance in the same storage. More...
 
agxData::EntityPtr copy (agxData::EntityStorage *target)
 Copy instance to another storage. More...
 
void copyAttributes (agxData::EntityPtr source)
 Copy instance attributes to an existing target instance. More...
 
template<typename T >
T & dataSet ()
 
template<typename T >
const T & dataSet () const
 
void destroy ()
 Remove the entity from the active storage. More...
 
MaterialData * getData ()
 
const MaterialData * getData () const
 
agx::Index getId () const
 
agxData::EntityModel * getModel ()
 
const agxData::EntityModel * getModel () const
 
agxData::EntityStorage * getStorage () const
 
agx::UInt32 hash () const
 
void init (agxData::EntityStorage *storage, agx::Index id)
 Set the target storage and id. More...
 
AGXPHYSICS_EXPORT MaterialInstance instance ()
 
AGXPHYSICS_EXPORT const MaterialInstance instance () const
 
void invalidate ()
 Invalidate the entity pointer. More...
 
bool isInstanceOf (agxData::EntityModel *model) const
 
bool isValid () const
 
AGXPHYSICS_EXPORT agx::Material *& model ()
 
AGXPHYSICS_EXPORT agx::Material *const & model () const
 
AGXPHYSICS_EXPORT agx::Name & name ()
 
AGXPHYSICS_EXPORT agx::Name const & name () const
 
AGXCORE_EXPORT agx::SpinMutex & observerMutex ()
 
AGXCORE_EXPORT agx::SpinMutex const & observerMutex () const
 
AGXCORE_EXPORT agx::Vector< agxData::EntityPtr *> & observers ()
 
AGXCORE_EXPORT agx::Vector< agxData::EntityPtr *> const & observers () const
 
 operator bool () const
 
bool operator! () const
 
bool operator!= (const EntityPtr &rhs) const
 
template<typename T >
T & operator() (const agxData::ScalarAttributeT< T > *attribute)
 Access the value of a specific attribute. More...
 
template<typename T >
const T & operator() (const agxData::ScalarAttributeT< T > *attribute) const
 
template<typename T >
T & operator() (const agxData::PointerAttributeT< T > *attribute)
 Pointer attribute. More...
 
template<typename T >
const T & operator() (const agxData::PointerAttributeT< T > *attribute) const
 
template<typename T >
agxData::VectorAttributeT< T >::Type & operator() (const agxData::VectorAttributeT< T > *attribute)
 Vector attribute. More...
 
template<typename T >
const agxData::VectorAttributeT< T >::Type & operator() (const agxData::VectorAttributeT< T > *attribute) const
 
template<typename T >
agxData::HashSetAttributeT< T >::Type & operator() (const agxData::HashSetAttributeT< T > *attribute)
 HashSet attribute. More...
 
template<typename T >
const agxData::HashSetAttributeT< T >::Type & operator() (const agxData::HashSetAttributeT< T > *attribute) const
 
template<typename T >
agxData::ArrayAttributeT< T >::Type & operator() (const agxData::ArrayAttributeT< T > *attribute)
 Array attribute. More...
 
template<typename T >
const agxData::ArrayAttributeT< T >::Type & operator() (const agxData::ArrayAttributeT< T > *attribute) const
 
template<typename T >
T & operator() (const agxData::SharedAttributeT< T > *attribute)
 Shared attribute. More...
 
template<typename T >
const T & operator() (const agxData::SharedAttributeT< T > *attribute) const
 
template<typename T >
ArrayAttributeT< T >::Type & operator() (const ArrayAttributeT< T > *attribute)
 
template<typename T >
const ArrayAttributeT< T >::Type & operator() (const ArrayAttributeT< T > *attribute) const
 
template<typename T >
VectorAttributeT< T >::Type & operator() (const VectorAttributeT< T > *attribute)
 
template<typename T >
const VectorAttributeT< T >::Type & operator() (const VectorAttributeT< T > *attribute) const
 
template<typename T >
HashSetAttributeT< T >::Type & operator() (const HashSetAttributeT< T > *attribute)
 
template<typename T >
const HashSetAttributeT< T >::Type & operator() (const HashSetAttributeT< T > *attribute) const
 
AGXPHYSICS_EXPORT MaterialSemantics * operator-> ()
 
AGXPHYSICS_EXPORT const MaterialSemantics * operator-> () const
 
bool operator< (const EntityPtr &rhs) const
 
AGXPHYSICS_EXPORT MaterialPtr & operator= (const agxData::EntityPtr &ptr)
 
AGXPHYSICS_EXPORT MaterialPtr & operator= (const agxData::EntityInstance &instance)
 
bool operator== (const EntityPtr &rhs) const
 
bool operator> (const EntityPtr &rhs) const
 
void print (std::ostream &stream) const
 
void print () const
 
AGXCORE_EXPORT agx::UInt32 & referenceCount ()
 
AGXCORE_EXPORT agx::UInt32 const & referenceCount () const
 
AGXPHYSICS_EXPORT agx::Physics::SurfaceMaterialPtr & surfaceMaterial ()
 
AGXPHYSICS_EXPORT agx::Physics::SurfaceMaterialPtr const & surfaceMaterial () const
 
void swapId (EntityPtr &other)
 Swap id with another instance. More...
 
void swapIndex (EntityPtr &other)
 Swap index with another instance. More...
 
void transfer (agxData::EntityStorage *target)
 Transfer instance to another storage. More...
 
void verifyIndex () const
 Check for broken ptr, by verifying that the id is active in the storage. More...
 
AGXPHYSICS_EXPORT agx::Physics::WireMaterialPtr & wireMaterial ()
 
AGXPHYSICS_EXPORT agx::Physics::WireMaterialPtr const & wireMaterial () const
 

Static Public Member Functions

static EntityPtr createWithIndex (EntityStorage *storage, agx::Index index)
 
static void TransformToAscii (void *targetBuffer, const void *sourceBuffer, size_t numElements)
 

Detailed Description

Pointer to a entity instance of type Physics.Material.

Definition at line 185 of file MaterialEntity.h.

Member Typedef Documentation

◆ DataType

Definition at line 189 of file MaterialEntity.h.

◆ InstanceType

typedef MaterialInstance agx::Physics::MaterialPtr::InstanceType

Definition at line 190 of file MaterialEntity.h.

◆ ModelType

Constructor & Destructor Documentation

◆ MaterialPtr() [1/4]

AGXPHYSICS_EXPORT agx::Physics::MaterialPtr::MaterialPtr ( )

◆ MaterialPtr() [2/4]

AGXPHYSICS_EXPORT agx::Physics::MaterialPtr::MaterialPtr ( agxData::EntityStorage *  storage,
agx::Index  id 
)

◆ MaterialPtr() [3/4]

AGXPHYSICS_EXPORT agx::Physics::MaterialPtr::MaterialPtr ( const agxData::EntityPtr &  ptr)

◆ MaterialPtr() [4/4]

AGXPHYSICS_EXPORT agx::Physics::MaterialPtr::MaterialPtr ( const agxData::EntityInstance &  instance)

Member Function Documentation

◆ bulkMaterial() [1/2]

AGXPHYSICS_EXPORT agx::Physics::BulkMaterialPtr& agx::Physics::MaterialPtr::bulkMaterial ( )
Returns
reference to the bulkMaterial attribute

◆ bulkMaterial() [2/2]

AGXPHYSICS_EXPORT agx::Physics::BulkMaterialPtr const& agx::Physics::MaterialPtr::bulkMaterial ( ) const
Returns
const reference to the bulkMaterial attribute

◆ calculateIndex()

agx::Index agxData::EntityPtr::calculateIndex ( ) const
inherited

◆ copy() [1/2]

agxData::EntityPtr agxData::EntityPtr::copy ( )
inherited

Create a copy instance in the same storage.

◆ copy() [2/2]

agxData::EntityPtr agxData::EntityPtr::copy ( agxData::EntityStorage *  target)
inherited

Copy instance to another storage.

◆ copyAttributes()

void agxData::EntityPtr::copyAttributes ( agxData::EntityPtr  source)
inherited

Copy instance attributes to an existing target instance.

◆ createWithIndex()

EntityPtr agxData::EntityPtr::createWithIndex ( EntityStorage *  storage,
agx::Index  index 
)
inlinestaticinherited

Definition at line 791 of file EntityStorage.h.

References agxAssert, and agxData::EntityStorage::indexToId().

Referenced by agx::createCell().

◆ dataSet() [1/2]

template<typename T >
T & agxData::EntityPtr::dataSet ( )
inherited

Definition at line 604 of file EntityStorage.h.

References agxAssert.

◆ dataSet() [2/2]

template<typename T >
const T & agxData::EntityPtr::dataSet ( ) const
inherited

Definition at line 611 of file EntityStorage.h.

◆ destroy()

void agxData::EntityPtr::destroy ( )
inherited

Remove the entity from the active storage.

◆ getData() [1/2]

MaterialData* agx::Physics::MaterialPtr::getData ( )

◆ getData() [2/2]

const MaterialData* agx::Physics::MaterialPtr::getData ( ) const

◆ getId()

◆ getModel() [1/2]

EntityModel * agxData::EntityPtr::getModel ( )
inherited
Returns
The entity model for this instance.

Definition at line 758 of file EntityStorage.h.

◆ getModel() [2/2]

const EntityModel * agxData::EntityPtr::getModel ( ) const
inherited

Definition at line 763 of file EntityStorage.h.

◆ getStorage()

EntityStorage * agxData::EntityPtr::getStorage ( ) const
inherited
Returns
The storage in which the entity is instantiated. nullptr if invalid pointer.

Definition at line 272 of file EntityPtr.h.

Referenced by agxCollide::CollisionGroupManager::canSetsCollide(), agxData::EntityStorage::dereferenceMultipliedAttribute(), agxData::EntityPtr::operator!=(), and agxData::EntityPtr::operator==().

◆ hash()

agx::UInt32 agxData::EntityPtr::hash ( ) const
inherited

Definition at line 281 of file EntityPtr.h.

References agx::hash().

◆ init()

void agxData::EntityPtr::init ( agxData::EntityStorage *  storage,
agx::Index  id 
)
inherited

Set the target storage and id.

Definition at line 589 of file EntityStorage.h.

Referenced by agxData::EntityPtr::EntityPtr().

◆ instance() [1/2]

AGXPHYSICS_EXPORT MaterialInstance agx::Physics::MaterialPtr::instance ( )

◆ instance() [2/2]

AGXPHYSICS_EXPORT const MaterialInstance agx::Physics::MaterialPtr::instance ( ) const

◆ invalidate()

void agxData::EntityPtr::invalidate ( )
inherited

Invalidate the entity pointer.

Definition at line 275 of file EntityPtr.h.

References agx::InvalidIndex.

◆ isInstanceOf()

bool agxData::EntityPtr::isInstanceOf ( agxData::EntityModel *  model) const
inherited
Returns
True if the pointer is an instance of a specified model or sub-model

Definition at line 785 of file EntityStorage.h.

◆ isValid()

bool agxData::EntityPtr::isValid ( ) const
inherited
Returns
True if the pointer is valid (non-nullptr)

Definition at line 287 of file EntityPtr.h.

Referenced by agxData::EntityPtr::operator bool(), and agxData::EntityPtr::operator!().

◆ model() [1/2]

AGXPHYSICS_EXPORT agx::Material*& agx::Physics::MaterialPtr::model ( )
Returns
reference to the model attribute

Referenced by agxSDK::MaterialManager::getContactMaterial().

◆ model() [2/2]

AGXPHYSICS_EXPORT agx::Material* const& agx::Physics::MaterialPtr::model ( ) const
Returns
const reference to the model attribute

◆ name() [1/2]

AGXPHYSICS_EXPORT agx::Name& agx::Physics::MaterialPtr::name ( )
Returns
reference to the name attribute

◆ name() [2/2]

AGXPHYSICS_EXPORT agx::Name const& agx::Physics::MaterialPtr::name ( ) const
Returns
const reference to the name attribute

◆ observerMutex() [1/2]

AGXCORE_EXPORT agx::SpinMutex& agx::ReferencedPtr::observerMutex ( )
inherited
Returns
reference to the observerMutex attribute

◆ observerMutex() [2/2]

AGXCORE_EXPORT agx::SpinMutex const& agx::ReferencedPtr::observerMutex ( ) const
inherited
Returns
const reference to the observerMutex attribute

◆ observers() [1/2]

AGXCORE_EXPORT agx::Vector< agxData::EntityPtr * >& agx::ReferencedPtr::observers ( )
inherited
Returns
reference to the observers attribute

◆ observers() [2/2]

AGXCORE_EXPORT agx::Vector< agxData::EntityPtr * > const& agx::ReferencedPtr::observers ( ) const
inherited
Returns
const reference to the observers attribute

◆ operator bool()

agxData::EntityPtr::operator bool ( ) const
inherited

Definition at line 289 of file EntityPtr.h.

References agxData::EntityPtr::isValid().

◆ operator!()

bool agxData::EntityPtr::operator! ( ) const
inherited

Definition at line 288 of file EntityPtr.h.

References agxData::EntityPtr::isValid().

◆ operator!=()

bool agxData::EntityPtr::operator!= ( const EntityPtr &  rhs) const
inherited

Definition at line 306 of file EntityPtr.h.

References agxData::EntityPtr::getId(), and agxData::EntityPtr::getStorage().

◆ operator()() [1/18]

template<typename T >
T & agxData::EntityPtr::operator() ( const agxData::ScalarAttributeT< T > *  attribute)
inherited

Access the value of a specific attribute.

Definition at line 642 of file EntityStorage.h.

◆ operator()() [2/18]

template<typename T >
const T & agxData::EntityPtr::operator() ( const agxData::ScalarAttributeT< T > *  attribute) const
inherited

Definition at line 648 of file EntityStorage.h.

◆ operator()() [3/18]

template<typename T >
T & agxData::EntityPtr::operator() ( const agxData::PointerAttributeT< T > *  attribute)
inherited

Pointer attribute.

Definition at line 654 of file EntityStorage.h.

◆ operator()() [4/18]

template<typename T >
const T & agxData::EntityPtr::operator() ( const agxData::PointerAttributeT< T > *  attribute) const
inherited

Definition at line 660 of file EntityStorage.h.

◆ operator()() [5/18]

template<typename T >
agxData::VectorAttributeT<T>::Type& agxData::EntityPtr::operator() ( const agxData::VectorAttributeT< T > *  attribute)
inherited

Vector attribute.

◆ operator()() [6/18]

template<typename T >
const agxData::VectorAttributeT<T>::Type& agxData::EntityPtr::operator() ( const agxData::VectorAttributeT< T > *  attribute) const
inherited

◆ operator()() [7/18]

template<typename T >
agxData::HashSetAttributeT<T>::Type& agxData::EntityPtr::operator() ( const agxData::HashSetAttributeT< T > *  attribute)
inherited

HashSet attribute.

◆ operator()() [8/18]

template<typename T >
const agxData::HashSetAttributeT<T>::Type& agxData::EntityPtr::operator() ( const agxData::HashSetAttributeT< T > *  attribute) const
inherited

◆ operator()() [9/18]

template<typename T >
agxData::ArrayAttributeT<T>::Type& agxData::EntityPtr::operator() ( const agxData::ArrayAttributeT< T > *  attribute)
inherited

Array attribute.

◆ operator()() [10/18]

template<typename T >
const agxData::ArrayAttributeT<T>::Type& agxData::EntityPtr::operator() ( const agxData::ArrayAttributeT< T > *  attribute) const
inherited

◆ operator()() [11/18]

template<typename T >
T & agxData::EntityPtr::operator() ( const agxData::SharedAttributeT< T > *  attribute)
inherited

Shared attribute.

Definition at line 744 of file EntityStorage.h.

References agxAssert, agxData::Value::get(), and agx::Object::getName().

◆ operator()() [12/18]

template<typename T >
const T & agxData::EntityPtr::operator() ( const agxData::SharedAttributeT< T > *  attribute) const
inherited

Definition at line 752 of file EntityStorage.h.

◆ operator()() [13/18]

template<typename T >
ArrayAttributeT<T>::Type& agxData::EntityPtr::operator() ( const ArrayAttributeT< T > *  attribute)
inherited

Definition at line 667 of file EntityStorage.h.

◆ operator()() [14/18]

template<typename T >
const ArrayAttributeT<T>::Type& agxData::EntityPtr::operator() ( const ArrayAttributeT< T > *  attribute) const
inherited

Definition at line 673 of file EntityStorage.h.

◆ operator()() [15/18]

template<typename T >
VectorAttributeT<T>::Type& agxData::EntityPtr::operator() ( const VectorAttributeT< T > *  attribute)
inherited

Definition at line 681 of file EntityStorage.h.

◆ operator()() [16/18]

template<typename T >
const VectorAttributeT<T>::Type& agxData::EntityPtr::operator() ( const VectorAttributeT< T > *  attribute) const
inherited

Definition at line 687 of file EntityStorage.h.

◆ operator()() [17/18]

template<typename T >
HashSetAttributeT<T>::Type& agxData::EntityPtr::operator() ( const HashSetAttributeT< T > *  attribute)
inherited

Definition at line 693 of file EntityStorage.h.

◆ operator()() [18/18]

template<typename T >
const HashSetAttributeT<T>::Type& agxData::EntityPtr::operator() ( const HashSetAttributeT< T > *  attribute) const
inherited

Definition at line 699 of file EntityStorage.h.

◆ operator->() [1/2]

AGXPHYSICS_EXPORT MaterialSemantics* agx::Physics::MaterialPtr::operator-> ( )

◆ operator->() [2/2]

AGXPHYSICS_EXPORT const MaterialSemantics* agx::Physics::MaterialPtr::operator-> ( ) const

◆ operator<()

bool agxData::EntityPtr::operator< ( const EntityPtr &  rhs) const
inherited

Definition at line 291 of file EntityPtr.h.

References agxData::EntityPtr::getId().

◆ operator=() [1/2]

AGXPHYSICS_EXPORT MaterialPtr& agx::Physics::MaterialPtr::operator= ( const agxData::EntityPtr &  ptr)

◆ operator=() [2/2]

AGXPHYSICS_EXPORT MaterialPtr& agx::Physics::MaterialPtr::operator= ( const agxData::EntityInstance &  instance)

◆ operator==()

bool agxData::EntityPtr::operator== ( const EntityPtr &  rhs) const
inherited

Definition at line 301 of file EntityPtr.h.

References agxData::EntityPtr::getId(), and agxData::EntityPtr::getStorage().

◆ operator>()

bool agxData::EntityPtr::operator> ( const EntityPtr &  rhs) const
inherited

Definition at line 296 of file EntityPtr.h.

References agxData::EntityPtr::getId().

◆ print() [1/2]

void agxData::EntityPtr::print ( std::ostream &  stream) const
inherited

◆ print() [2/2]

void agxData::EntityPtr::print ( ) const
inherited

◆ referenceCount() [1/2]

AGXCORE_EXPORT agx::UInt32& agx::ReferencedPtr::referenceCount ( )
inherited
Returns
reference to the referenceCount attribute

◆ referenceCount() [2/2]

AGXCORE_EXPORT agx::UInt32 const& agx::ReferencedPtr::referenceCount ( ) const
inherited
Returns
const reference to the referenceCount attribute

◆ surfaceMaterial() [1/2]

AGXPHYSICS_EXPORT agx::Physics::SurfaceMaterialPtr& agx::Physics::MaterialPtr::surfaceMaterial ( )
Returns
reference to the surfaceMaterial attribute

◆ surfaceMaterial() [2/2]

AGXPHYSICS_EXPORT agx::Physics::SurfaceMaterialPtr const& agx::Physics::MaterialPtr::surfaceMaterial ( ) const
Returns
const reference to the surfaceMaterial attribute

◆ swapId()

void agxData::EntityPtr::swapId ( EntityPtr &  other)
inherited

Swap id with another instance.

Both must be part of the same storage.

Definition at line 768 of file EntityStorage.h.

References agxAssert.

◆ swapIndex()

void agxData::EntityPtr::swapIndex ( EntityPtr &  other)
inherited

Swap index with another instance.

Both must be part of the same storage.

Definition at line 776 of file EntityStorage.h.

References agxAssert, and agxData::EntityPtr::calculateIndex().

◆ transfer()

void agxData::EntityPtr::transfer ( agxData::EntityStorage *  target)
inherited

Transfer instance to another storage.

◆ TransformToAscii()

static void agxData::EntityPtr::TransformToAscii ( void *  targetBuffer,
const void *  sourceBuffer,
size_t  numElements 
)
staticinherited

◆ verifyIndex()

void agxData::EntityPtr::verifyIndex ( ) const
inherited

Check for broken ptr, by verifying that the id is active in the storage.

Only used in debug mode.

Definition at line 632 of file EntityStorage.h.

References agxAssertN.

◆ wireMaterial() [1/2]

AGXPHYSICS_EXPORT agx::Physics::WireMaterialPtr& agx::Physics::MaterialPtr::wireMaterial ( )
Returns
reference to the wireMaterial attribute

◆ wireMaterial() [2/2]

AGXPHYSICS_EXPORT agx::Physics::WireMaterialPtr const& agx::Physics::MaterialPtr::wireMaterial ( ) const
Returns
const reference to the wireMaterial attribute

The documentation for this class was generated from the following file: