21 #ifndef GENERATED_AGX_PHYSICS_BODYCONTACT_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_BODYCONTACT_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 )
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();
208 #ifdef AGX_GENERATED_TOLUA_WRAPPER
209 inline agx::Int const& getBody1()
const {
return (*this)->getBody1(); }
210 inline agx::Int const& getBody2()
const {
return (*this)->getBody2(); }
211 inline agx::Int const& getContactListOffset()
const {
return (*this)->getContactListOffset(); }
214 inline void setBody1(
agx::Int const& value) { (*this)->setBody1(value); }
215 inline void setBody2(
agx::Int const& value) { (*this)->setBody2(value); }
216 inline void setContactListOffset(
agx::Int const& value) { (*this)->setContactListOffset(value); }
227 BodyContactInstance();
228 BodyContactInstance(BodyContactData* data,
agx::Index index);
233 BodyContactData* getData();
234 const BodyContactData* getData()
const;
250 agx::Int const& contactListOffset()
const;
266 inline BodyContactInstance
agx::Physics::BodyContactData::operator[] (
size_t index) {
return BodyContactInstance(
this, (
agx::Index)index); }
273 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
280 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
288 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
297 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
304 AGX_FORCE_INLINE BodyContactSemantics* BodyContactPtr::operator->() {
return (BodyContactSemantics* )
this; }
305 AGX_FORCE_INLINE const BodyContactSemantics* BodyContactPtr::operator->()
const {
return (
const BodyContactSemantics* )
this; }
310 AGX_FORCE_INLINE agx::Int const& BodyContactPtr::body1()
const { verifyIndex();
return getData()->body1[calculateIndex()]; }
313 AGX_FORCE_INLINE agx::Int const& BodyContactPtr::body2()
const { verifyIndex();
return getData()->body2[calculateIndex()]; }
315 AGX_FORCE_INLINE agx::Int& BodyContactPtr::contactListOffset() { verifyIndex();
return getData()->contactListOffset[calculateIndex()]; }
316 AGX_FORCE_INLINE agx::Int const& BodyContactPtr::contactListOffset()
const { verifyIndex();
return getData()->contactListOffset[calculateIndex()]; }
325 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
332 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
341 AGX_FORCE_INLINE agx::Int const& BodyContactInstance::body1()
const { verifyIndex();
return getData()->body1[getIndex()]; }
344 AGX_FORCE_INLINE agx::Int const& BodyContactInstance::body2()
const { verifyIndex();
return getData()->body2[getIndex()]; }
346 AGX_FORCE_INLINE agx::Int& BodyContactInstance::contactListOffset() { verifyIndex();
return getData()->contactListOffset[getIndex()]; }
347 AGX_FORCE_INLINE agx::Int const& BodyContactInstance::contactListOffset()
const { verifyIndex();
return getData()->contactListOffset[getIndex()]; }
360 # pragma warning(pop)
363 #undef AGX_ENTITY_WRAPPER
364 #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...
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
agxData::EntityInstance instance()
EntityPtr & operator=(const EntityPtr &other)=default
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()
BodyContactModel(const agx::String &name="BodyContact")
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
void construct(agx::Physics::BodyContactPtr bodyContact)
static agxData::EntityStorage * defaultStorage()
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 BodyContactSemantics * operator->()
AGXPHYSICS_EXPORT const BodyContactInstance instance() const
AGXPHYSICS_EXPORT agx::Int const & body2() const
AGXPHYSICS_EXPORT const BodyContactSemantics * operator->() const
AGXPHYSICS_EXPORT BodyContactPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Int & body1()
AGXPHYSICS_EXPORT BodyContactInstance instance()
BodyContactData * getData()
AGXPHYSICS_EXPORT BodyContactPtr(const agxData::EntityInstance &instance)
BodyContactInstance InstanceType
BodyContactModel ModelType
AGXPHYSICS_EXPORT BodyContactPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agx::Int & body2()
AGXPHYSICS_EXPORT BodyContactPtr()
AGXPHYSICS_EXPORT agx::Int const & contactListOffset() const
AGXPHYSICS_EXPORT agx::Int const & body1() const
const BodyContactData * getData() const
AGXPHYSICS_EXPORT agx::Int & contactListOffset()
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.
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())