21#ifndef GENERATED_AGX_PHYSICS_PARTICLE_CONTACTCONSTRAINT_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_PARTICLE_CONTACTCONSTRAINT_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 )
60 class ContactConstraintData;
62 class ContactConstraintInstance;
63 class ContactConstraintSemantics;
104 virtual void configure(agx::TiXmlElement* eEntity)
override;
112 #ifndef AGX_PHYSICS_PARTICLE_CONTACTCONSTRAINT_DATA_SET_OVERRIDE
113 #define AGX_PHYSICS_PARTICLE_CONTACTCONSTRAINT_DATA_SET
114 class AGXPHYSICS_EXPORT ContactConstraintData :
public agx::Physics::InteractionData
117 ContactConstraintInstance operator[] (
size_t index);
140 ContactConstraintData();
143 virtual ~ContactConstraintData() {}
144 virtual void setNumElements(
agx::Index numElements)
override;
147 ContactConstraintData& operator= (
const ContactConstraintData&) {
return *
this; }
175 void setIsImpacting(
agx::Bool const& value);
181 friend class ContactConstraintPtr;
182 friend class ContactConstraintInstance;
183 ContactConstraintSemantics();
257 ContactConstraintInstance();
258 ContactConstraintInstance(ContactConstraintData* data,
agx::Index index);
263 ContactConstraintData* getData();
264 const ContactConstraintData* getData()
const;
316 inline ContactConstraintInstance
agx::Physics::Particle::ContactConstraintData::operator[] (
size_t index) {
return ContactConstraintInstance(
this, (
agx::Index)index); }
323 "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\'",
338 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
347 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
382 AGX_FORCE_INLINE ContactConstraintInstance::ContactConstraintInstance(ContactConstraintData* data,
agx::Index index) :
agx::Physics::InteractionInstance(data, index) {}
387 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
394 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
403 AGX_FORCE_INLINE agx::UInt32 const& ContactConstraintInstance::particle1()
const { verifyIndex();
return getData()->particle1[getIndex()]; }
406 AGX_FORCE_INLINE agx::UInt32 const& ContactConstraintInstance::particle2()
const { verifyIndex();
return getData()->particle2[getIndex()]; }
408 AGX_FORCE_INLINE agx::UInt32& ContactConstraintInstance::contactIndex() { verifyIndex();
return getData()->contactIndex[getIndex()]; }
409 AGX_FORCE_INLINE agx::UInt32 const& ContactConstraintInstance::contactIndex()
const { verifyIndex();
return getData()->contactIndex[getIndex()]; }
411 AGX_FORCE_INLINE agx::UInt32& ContactConstraintInstance::materialIndex() { verifyIndex();
return getData()->materialIndex[getIndex()]; }
412 AGX_FORCE_INLINE agx::UInt32 const& ContactConstraintInstance::materialIndex()
const { verifyIndex();
return getData()->materialIndex[getIndex()]; }
414 AGX_FORCE_INLINE agx::Bool& ContactConstraintInstance::isImpacting() { verifyIndex();
return getData()->isImpacting[getIndex()]; }
415 AGX_FORCE_INLINE agx::Bool const& ContactConstraintInstance::isImpacting()
const { verifyIndex();
return getData()->isImpacting[getIndex()]; }
424 AGX_FORCE_INLINE ContactConstraintSemantics::ContactConstraintSemantics() {}
432AGX_TYPE_BINDING(
agx::Physics::Particle::ContactConstraintInstance, "Physics.Particle.ContactConstraintInstance")
438#undef AGX_ENTITY_WRAPPER
439#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...
agx::Index calculateIndex() const
Calculate the index using the indirect id.
EntityPtr & operator=(const EntityPtr &other)=default
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
agxData::EntityInstance instance()
void verifyIndex() const
Check for broken ptr, by verifying that the id is active in the storage.
Data storage for a collection of entity instances of a specified EntityModel.
agx::String fullPath() const
AGXPHYSICS_EXPORT agx::Bool & isImpacting()
Abstract description of the data attributes for the Physics.Interaction entity.
Pointer to a entity instance of type Physics.Interaction.
Abstract description of the data attributes for the Physics.Particle.ContactConstraint entity.
static agxData::ScalarAttributeT< agx::UInt32 > * particle1Attribute
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
virtual void initAttributeAccessors() override
static agxData::ScalarAttributeT< agx::Bool > * isImpactingAttribute
static ContactConstraintModel * instance()
void construct(agx::Physics::Particle::ContactConstraintPtr contactConstraint)
static agxData::ScalarAttributeT< agx::UInt32 > * particle2Attribute
static agxData::ScalarAttributeT< agx::UInt32 > * materialIndexAttribute
virtual void configure(agx::TiXmlElement *eEntity) override
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
virtual void construct(agxData::EntityPtr instance) override
static ContactConstraintPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static agxData::ScalarAttributeT< agx::UInt32 > * contactIndexAttribute
static agxData::ScalarAttributeT< agx::ParticleParticleContactJacobian > * GAttribute
static agxData::EntityStorage * defaultStorage()
ContactConstraintPtr PtrT
ContactConstraintModel(const agx::String &name="ContactConstraint")
static agxData::ScalarAttributeT< agx::ParticleParticleContactJacobian > * GMInvAttribute
virtual ~ContactConstraintModel()
Pointer to a entity instance of type Physics.Particle.ContactConstraint.
AGXPHYSICS_EXPORT agx::ParticleParticleContactJacobian & G()
AGXPHYSICS_EXPORT ContactConstraintPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT ContactConstraintSemantics * operator->()
AGXPHYSICS_EXPORT agx::ParticleParticleContactJacobian const & G() const
AGXPHYSICS_EXPORT agx::UInt32 & contactIndex()
ContactConstraintInstance InstanceType
AGXPHYSICS_EXPORT agx::Bool const & isImpacting() const
AGXPHYSICS_EXPORT agx::UInt32 const & particle1() const
AGXPHYSICS_EXPORT ContactConstraintPtr()
AGXPHYSICS_EXPORT agx::UInt32 & particle2()
AGXPHYSICS_EXPORT agx::UInt32 const & particle2() const
AGXPHYSICS_EXPORT const ContactConstraintSemantics * operator->() const
AGXPHYSICS_EXPORT agx::Bool & isImpacting()
AGXPHYSICS_EXPORT ContactConstraintInstance instance()
ContactConstraintModel ModelType
ContactConstraintData * getData()
AGXPHYSICS_EXPORT const ContactConstraintInstance instance() const
AGXPHYSICS_EXPORT agx::UInt32 const & materialIndex() const
AGXPHYSICS_EXPORT agx::UInt32 & materialIndex()
AGXPHYSICS_EXPORT ContactConstraintPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::ParticleParticleContactJacobian const & GMInv() const
ContactConstraintData DataType
const ContactConstraintData * getData() const
AGXPHYSICS_EXPORT ContactConstraintPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::UInt32 & particle1()
AGXPHYSICS_EXPORT agx::ParticleParticleContactJacobian & GMInv()
AGXPHYSICS_EXPORT agx::UInt32 const & contactIndex() const
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.