21#ifndef GENERATED_AGX_PHYSICS_GRANULARBODY_CACHEDGRANULARCONTACT_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_GRANULARBODY_CACHEDGRANULARCONTACT_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 )
56 namespace GranularBody
59 class CachedGranularContactModel;
60 class CachedGranularContactData;
61 class CachedGranularContactPtr;
62 class CachedGranularContactInstance;
63 class CachedGranularContactSemantics;
102 virtual void configure(agx::TiXmlElement* eEntity)
override;
110 #ifndef AGX_PHYSICS_GRANULARBODY_CACHEDGRANULARCONTACT_DATA_SET_OVERRIDE
111 #define AGX_PHYSICS_GRANULARBODY_CACHEDGRANULARCONTACT_DATA_SET
115 CachedGranularContactInstance operator[] (
size_t index);
134 CachedGranularContactData();
137 virtual ~CachedGranularContactData() {}
138 virtual void setNumElements(
agx::Index numElements)
override;
141 CachedGranularContactData& operator= (
const CachedGranularContactData&) {
return *
this; }
158 agx::Bool const& getShouldWarmStart()
const;
164 void setDuplicate(
agx::Bool const& value);
166 void setContactNormal(
agx::Vec3f const& value);
167 void setShouldWarmStart(
agx::Bool const& value);
171 friend class CachedGranularContactPtr;
172 friend class CachedGranularContactInstance;
173 CachedGranularContactSemantics();
202 const CachedGranularContactData*
getData()
const;
237 CachedGranularContactInstance();
238 CachedGranularContactInstance(CachedGranularContactData* data,
agx::Index index);
243 CachedGranularContactData* getData();
244 const CachedGranularContactData* getData()
const;
270 agx::Bool const& shouldWarmStart()
const;
286 inline CachedGranularContactInstance
agx::Physics::GranularBody::CachedGranularContactData::operator[] (
size_t index) {
return CachedGranularContactInstance(
this, (
agx::Index)index); }
293 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
300 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
308 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
309 EntityPtr::getModel()->fullPath().c_str(), CachedGranularContactModel::instance()->fullPath().c_str());
317 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
318 EntityPtr::getModel()->fullPath().c_str(), CachedGranularContactModel::instance()->fullPath().c_str());
324 AGX_FORCE_INLINE CachedGranularContactSemantics* CachedGranularContactPtr::operator->() {
return (CachedGranularContactSemantics* )
this; }
325 AGX_FORCE_INLINE const CachedGranularContactSemantics* CachedGranularContactPtr::operator->()
const {
return (
const CachedGranularContactSemantics* )
this; }
329 AGX_FORCE_INLINE agx::Bool& CachedGranularContactPtr::keep() { verifyIndex();
return getData()->keep[calculateIndex()]; }
330 AGX_FORCE_INLINE agx::Bool const& CachedGranularContactPtr::keep()
const { verifyIndex();
return getData()->keep[calculateIndex()]; }
332 AGX_FORCE_INLINE agx::Bool& CachedGranularContactPtr::duplicate() { verifyIndex();
return getData()->duplicate[calculateIndex()]; }
333 AGX_FORCE_INLINE agx::Bool const& CachedGranularContactPtr::duplicate()
const { verifyIndex();
return getData()->duplicate[calculateIndex()]; }
338 AGX_FORCE_INLINE agx::Vec3f& CachedGranularContactPtr::contactNormal() { verifyIndex();
return getData()->contactNormal[calculateIndex()]; }
339 AGX_FORCE_INLINE agx::Vec3f const& CachedGranularContactPtr::contactNormal()
const { verifyIndex();
return getData()->contactNormal[calculateIndex()]; }
341 AGX_FORCE_INLINE agx::Bool& CachedGranularContactPtr::shouldWarmStart() { verifyIndex();
return getData()->shouldWarmStart[calculateIndex()]; }
342 AGX_FORCE_INLINE agx::Bool const& CachedGranularContactPtr::shouldWarmStart()
const { verifyIndex();
return getData()->shouldWarmStart[calculateIndex()]; }
345 AGX_FORCE_INLINE CachedGranularContactInstance::CachedGranularContactInstance() {}
346 AGX_FORCE_INLINE CachedGranularContactInstance::CachedGranularContactInstance(CachedGranularContactData* data,
agx::Index index) :
agxData::EntityInstance(data, index) {}
351 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
358 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
367 AGX_FORCE_INLINE agx::Bool const& CachedGranularContactInstance::keep()
const { verifyIndex();
return getData()->keep[getIndex()]; }
369 AGX_FORCE_INLINE agx::Bool& CachedGranularContactInstance::duplicate() { verifyIndex();
return getData()->duplicate[getIndex()]; }
370 AGX_FORCE_INLINE agx::Bool const& CachedGranularContactInstance::duplicate()
const { verifyIndex();
return getData()->duplicate[getIndex()]; }
375 AGX_FORCE_INLINE agx::Vec3f& CachedGranularContactInstance::contactNormal() { verifyIndex();
return getData()->contactNormal[getIndex()]; }
376 AGX_FORCE_INLINE agx::Vec3f const& CachedGranularContactInstance::contactNormal()
const { verifyIndex();
return getData()->contactNormal[getIndex()]; }
378 AGX_FORCE_INLINE agx::Bool& CachedGranularContactInstance::shouldWarmStart() { verifyIndex();
return getData()->shouldWarmStart[getIndex()]; }
379 AGX_FORCE_INLINE agx::Bool const& CachedGranularContactInstance::shouldWarmStart()
const { verifyIndex();
return getData()->shouldWarmStart[getIndex()]; }
382 AGX_FORCE_INLINE CachedGranularContactSemantics::CachedGranularContactSemantics() {}
390AGX_TYPE_BINDING(
agx::Physics::GranularBody::CachedGranularContactInstance, "Physics.GranularBody.CachedGranularContactInstance")
396#undef AGX_ENTITY_WRAPPER
397#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()
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
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.
agx::String fullPath() const
Abstract description of the data attributes for the Physics.GranularBody.CachedGranularContact entity...
virtual void construct(agxData::EntityPtr instance) override
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
CachedGranularContactPtr PtrT
void construct(agx::Physics::GranularBody::CachedGranularContactPtr cachedGranularContact)
virtual ~CachedGranularContactModel()
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
CachedGranularContactModel(const agx::String &name="CachedGranularContact")
static agxData::ScalarAttributeT< agx::Bool > * shouldWarmStartAttribute
virtual void initAttributeAccessors() override
static agxData::ScalarAttributeT< agx::Physics::GranularBody::ContactLambda > * contactLambdasAttribute
static agxData::ScalarAttributeT< agx::Vec3f > * contactNormalAttribute
static CachedGranularContactModel * instance()
static agxData::ScalarAttributeT< agx::Bool > * duplicateAttribute
virtual void configure(agx::TiXmlElement *eEntity) override
static agxData::EntityStorage * defaultStorage()
static agxData::ScalarAttributeT< agx::Bool > * keepAttribute
static CachedGranularContactPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
Pointer to a entity instance of type Physics.GranularBody.CachedGranularContact.
const CachedGranularContactData * getData() const
AGXPHYSICS_EXPORT const CachedGranularContactInstance instance() const
AGXPHYSICS_EXPORT const CachedGranularContactSemantics * operator->() const
CachedGranularContactModel ModelType
AGXPHYSICS_EXPORT CachedGranularContactSemantics * operator->()
AGXPHYSICS_EXPORT agx::Vec3f const & contactNormal() const
AGXPHYSICS_EXPORT agx::Bool & keep()
AGXPHYSICS_EXPORT CachedGranularContactInstance instance()
AGXPHYSICS_EXPORT agx::Physics::GranularBody::ContactLambda & contactLambdas()
CachedGranularContactInstance InstanceType
AGXPHYSICS_EXPORT CachedGranularContactPtr(const agxData::EntityPtr &ptr)
CachedGranularContactData DataType
AGXPHYSICS_EXPORT agx::Bool & shouldWarmStart()
AGXPHYSICS_EXPORT agx::Bool const & duplicate() const
AGXPHYSICS_EXPORT agx::Vec3f & contactNormal()
AGXPHYSICS_EXPORT CachedGranularContactPtr(agxData::EntityStorage *storage, agx::Index id)
CachedGranularContactData * getData()
AGXPHYSICS_EXPORT agx::Bool const & keep() const
AGXPHYSICS_EXPORT CachedGranularContactPtr()
AGXPHYSICS_EXPORT agx::Physics::GranularBody::ContactLambda const & contactLambdas() const
AGXPHYSICS_EXPORT CachedGranularContactPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::Bool const & shouldWarmStart() const
AGXPHYSICS_EXPORT agx::Bool & duplicate()
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.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.