21#ifndef GENERATED_AGX_PHYSICS_BODYCONTACT_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_BODYCONTACT_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 )
55 class BodyContactModel;
56 class BodyContactData;
58 class BodyContactInstance;
59 class BodyContactSemantics;
96 virtual void configure(agx::TiXmlElement* eEntity)
override;
104 #ifndef AGX_PHYSICS_BODYCONTACT_DATA_SET_OVERRIDE
105 #define AGX_PHYSICS_BODYCONTACT_DATA_SET
109 BodyContactInstance operator[] (
size_t index);
120 typedef agx::Int contactListOffsetType;
127 virtual ~BodyContactData() {}
128 virtual void setNumElements(
agx::Index numElements)
override;
131 BodyContactData& operator= (
const BodyContactData&) {
return *
this; }
146 agx::Int const& getContactListOffset()
const;
151 void setBody1(
agx::Int const& value);
152 void setBody2(
agx::Int const& value);
153 void setContactListOffset(
agx::Int const& value);
157 friend class BodyContactPtr;
158 friend class BodyContactInstance;
159 BodyContactSemantics();
213 BodyContactInstance();
214 BodyContactInstance(BodyContactData* data,
agx::Index index);
219 BodyContactData* getData();
220 const BodyContactData* getData()
const;
236 agx::Int const& contactListOffset()
const;
252 inline BodyContactInstance
agx::Physics::BodyContactData::operator[] (
size_t index) {
return BodyContactInstance(
this, (
agx::Index)index); }
259 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
266 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
274 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
275 EntityPtr::getModel()->fullPath().c_str(), BodyContactModel::instance()->fullPath().c_str());
283 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
284 EntityPtr::getModel()->fullPath().c_str(), BodyContactModel::instance()->fullPath().c_str());
290 AGX_FORCE_INLINE BodyContactSemantics* BodyContactPtr::operator->() {
return (BodyContactSemantics* )
this; }
291 AGX_FORCE_INLINE const BodyContactSemantics* BodyContactPtr::operator->()
const {
return (
const BodyContactSemantics* )
this; }
296 AGX_FORCE_INLINE agx::Int const& BodyContactPtr::body1()
const { verifyIndex();
return getData()->body1[calculateIndex()]; }
299 AGX_FORCE_INLINE agx::Int const& BodyContactPtr::body2()
const { verifyIndex();
return getData()->body2[calculateIndex()]; }
301 AGX_FORCE_INLINE agx::Int& BodyContactPtr::contactListOffset() { verifyIndex();
return getData()->contactListOffset[calculateIndex()]; }
302 AGX_FORCE_INLINE agx::Int const& BodyContactPtr::contactListOffset()
const { verifyIndex();
return getData()->contactListOffset[calculateIndex()]; }
311 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
318 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
327 AGX_FORCE_INLINE agx::Int const& BodyContactInstance::body1()
const { verifyIndex();
return getData()->body1[getIndex()]; }
330 AGX_FORCE_INLINE agx::Int const& BodyContactInstance::body2()
const { verifyIndex();
return getData()->body2[getIndex()]; }
332 AGX_FORCE_INLINE agx::Int& BodyContactInstance::contactListOffset() { verifyIndex();
return getData()->contactListOffset[getIndex()]; }
333 AGX_FORCE_INLINE agx::Int const& BodyContactInstance::contactListOffset()
const { verifyIndex();
return getData()->contactListOffset[getIndex()]; }
349#undef AGX_ENTITY_WRAPPER
350#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.BodyContact entity.
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
virtual void configure(agx::TiXmlElement *eEntity) override
virtual void construct(agxData::EntityPtr instance) override
static agxData::ScalarAttributeT< agx::Int > * contactListOffsetAttribute
static BodyContactModel * instance()
virtual void initAttributeAccessors() override
virtual ~BodyContactModel()
static agxData::EntityStorage * defaultStorage()
BodyContactModel(const agx::String &name="BodyContact")
void construct(agx::Physics::BodyContactPtr bodyContact)
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::ScalarAttributeT< agx::Int > * body1Attribute
static BodyContactPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static agxData::ScalarAttributeT< agx::Int > * body2Attribute
Pointer to a entity instance of type Physics.BodyContact.
AGXPHYSICS_EXPORT const BodyContactSemantics * operator->() const
AGXPHYSICS_EXPORT const BodyContactInstance instance() const
AGXPHYSICS_EXPORT agx::Int const & body1() const
BodyContactData * getData()
AGXPHYSICS_EXPORT BodyContactPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Int & body1()
AGXPHYSICS_EXPORT BodyContactInstance instance()
AGXPHYSICS_EXPORT agx::Int const & body2() const
AGXPHYSICS_EXPORT BodyContactPtr(const agxData::EntityInstance &instance)
BodyContactInstance InstanceType
BodyContactModel ModelType
AGXPHYSICS_EXPORT BodyContactPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT BodyContactSemantics * operator->()
AGXPHYSICS_EXPORT agx::Int & contactListOffset()
AGXPHYSICS_EXPORT BodyContactPtr()
const BodyContactData * getData() const
AGXPHYSICS_EXPORT agx::Int const & contactListOffset() const
AGXPHYSICS_EXPORT agx::Int & body2()
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.