21 #ifndef GENERATED_AGX_PHYSICS_GRANULARBODY_CONTACTCONSTRAINT_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_GRANULARBODY_CONTACTCONSTRAINT_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 )
56 namespace GranularBody
59 class ContactConstraintModel;
60 class ContactConstraintData;
61 class ContactConstraintPtr;
62 class ContactConstraintInstance;
63 class ContactConstraintSemantics;
115 virtual void configure(agx::TiXmlElement* eEntity)
override;
123 #ifndef AGX_PHYSICS_GRANULARBODY_CONTACTCONSTRAINT_DATA_SET_OVERRIDE
124 #define AGX_PHYSICS_GRANULARBODY_CONTACTCONSTRAINT_DATA_SET
128 ContactConstraintInstance operator[] (
size_t index);
167 typedef agx::Real nonlinearMultiplierType;
168 typedef agx::Real rollingResistanceMuType;
169 typedef agx::Real twistLimitMultiplierType;
173 ContactConstraintData();
176 virtual ~ContactConstraintData() {}
177 virtual void setNumElements(
agx::Index numElements)
override;
180 ContactConstraintData& operator= (
const ContactConstraintData&) {
return *
this; }
204 agx::Real const& getRestingCompliance()
const;
205 agx::Real const& getCharContactTime()
const;
208 agx::Real const& getNonlinearMultiplier()
const;
209 agx::Real const& getRollingResistanceMu()
const;
210 agx::Real const& getTwistLimitMultiplier()
const;
225 void setIsImpacting(
agx::Bool const& value);
226 void setRestingCompliance(
agx::Real const& value);
227 void setCharContactTime(
agx::Real const& value);
228 void setCharMass(
agx::Real const& value);
230 void setNonlinearMultiplier(
agx::Real const& value);
231 void setRollingResistanceMu(
agx::Real const& value);
232 void setTwistLimitMultiplier(
agx::Real const& value);
236 friend class ContactConstraintPtr;
237 friend class ContactConstraintInstance;
238 ContactConstraintSemantics();
362 #ifdef AGX_GENERATED_TOLUA_WRAPPER
363 inline agx::UInt32 const& getBody1()
const {
return (*this)->getBody1(); }
364 inline agx::UInt32 const& getBody2()
const {
return (*this)->getBody2(); }
365 inline agx::UInt32 const& getSolveBody1()
const {
return (*this)->getSolveBody1(); }
366 inline agx::UInt32 const& getSolveBody2()
const {
return (*this)->getSolveBody2(); }
367 inline agx::UInt32 const& getCachedContactId()
const {
return (*this)->getCachedContactId(); }
368 inline agx::UInt32 const& getContactIndex()
const {
return (*this)->getContactIndex(); }
369 inline agx::UInt32 const& getJacobianIndex()
const {
return (*this)->getJacobianIndex(); }
370 inline agx::UInt32 const& getRowIndex()
const {
return (*this)->getRowIndex(); }
371 inline agx::UInt32 const& getMaterialIndex()
const {
return (*this)->getMaterialIndex(); }
372 inline agx::UInt32 const& getIterationCount()
const {
return (*this)->getIterationCount(); }
373 inline agx::Bool const& getIsImpacting()
const {
return (*this)->getIsImpacting(); }
374 inline agx::Real const& getRestingCompliance()
const {
return (*this)->getRestingCompliance(); }
375 inline agx::Real const& getCharContactTime()
const {
return (*this)->getCharContactTime(); }
376 inline agx::Real const& getCharMass()
const {
return (*this)->getCharMass(); }
378 inline agx::Real const& getNonlinearMultiplier()
const {
return (*this)->getNonlinearMultiplier(); }
379 inline agx::Real const& getRollingResistanceMu()
const {
return (*this)->getRollingResistanceMu(); }
380 inline agx::Real const& getTwistLimitMultiplier()
const {
return (*this)->getTwistLimitMultiplier(); }
383 inline void setBody1(
agx::UInt32 const& value) { (*this)->setBody1(value); }
384 inline void setBody2(
agx::UInt32 const& value) { (*this)->setBody2(value); }
385 inline void setSolveBody1(
agx::UInt32 const& value) { (*this)->setSolveBody1(value); }
386 inline void setSolveBody2(
agx::UInt32 const& value) { (*this)->setSolveBody2(value); }
387 inline void setCachedContactId(
agx::UInt32 const& value) { (*this)->setCachedContactId(value); }
388 inline void setContactIndex(
agx::UInt32 const& value) { (*this)->setContactIndex(value); }
389 inline void setJacobianIndex(
agx::UInt32 const& value) { (*this)->setJacobianIndex(value); }
390 inline void setRowIndex(
agx::UInt32 const& value) { (*this)->setRowIndex(value); }
391 inline void setMaterialIndex(
agx::UInt32 const& value) { (*this)->setMaterialIndex(value); }
392 inline void setIterationCount(
agx::UInt32 const& value) { (*this)->setIterationCount(value); }
393 inline void setIsImpacting(
agx::Bool const& value) { (*this)->setIsImpacting(value); }
394 inline void setRestingCompliance(
agx::Real const& value) { (*this)->setRestingCompliance(value); }
395 inline void setCharContactTime(
agx::Real const& value) { (*this)->setCharContactTime(value); }
396 inline void setCharMass(
agx::Real const& value) { (*this)->setCharMass(value); }
397 inline void setGMeta(
agx::JacobianMeta const& value) { (*this)->setGMeta(value); }
398 inline void setNonlinearMultiplier(
agx::Real const& value) { (*this)->setNonlinearMultiplier(value); }
399 inline void setRollingResistanceMu(
agx::Real const& value) { (*this)->setRollingResistanceMu(value); }
400 inline void setTwistLimitMultiplier(
agx::Real const& value) { (*this)->setTwistLimitMultiplier(value); }
411 ContactConstraintInstance();
412 ContactConstraintInstance(ContactConstraintData* data,
agx::Index index);
417 ContactConstraintData* getData();
418 const ContactConstraintData* getData()
const;
479 agx::Real const& restingCompliance()
const;
484 agx::Real const& charContactTime()
const;
499 agx::Real const& nonlinearMultiplier()
const;
504 agx::Real const& rollingResistanceMu()
const;
509 agx::Real const& twistLimitMultiplier()
const;
525 inline ContactConstraintInstance
agx::Physics::GranularBody::ContactConstraintData::operator[] (
size_t index) {
return ContactConstraintInstance(
this, (
agx::Index)index); }
532 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
539 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
547 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
556 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
629 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
636 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
645 AGX_FORCE_INLINE agx::UInt32 const& ContactConstraintInstance::body1()
const { verifyIndex();
return getData()->body1[getIndex()]; }
648 AGX_FORCE_INLINE agx::UInt32 const& ContactConstraintInstance::body2()
const { verifyIndex();
return getData()->body2[getIndex()]; }
651 AGX_FORCE_INLINE agx::UInt32 const& ContactConstraintInstance::solveBody1()
const { verifyIndex();
return getData()->solveBody1[getIndex()]; }
654 AGX_FORCE_INLINE agx::UInt32 const& ContactConstraintInstance::solveBody2()
const { verifyIndex();
return getData()->solveBody2[getIndex()]; }
656 AGX_FORCE_INLINE agx::UInt32& ContactConstraintInstance::cachedContactId() { verifyIndex();
return getData()->cachedContactId[getIndex()]; }
657 AGX_FORCE_INLINE agx::UInt32 const& ContactConstraintInstance::cachedContactId()
const { verifyIndex();
return getData()->cachedContactId[getIndex()]; }
659 AGX_FORCE_INLINE agx::UInt32& ContactConstraintInstance::contactIndex() { verifyIndex();
return getData()->contactIndex[getIndex()]; }
660 AGX_FORCE_INLINE agx::UInt32 const& ContactConstraintInstance::contactIndex()
const { verifyIndex();
return getData()->contactIndex[getIndex()]; }
662 AGX_FORCE_INLINE agx::UInt32& ContactConstraintInstance::jacobianIndex() { verifyIndex();
return getData()->jacobianIndex[getIndex()]; }
663 AGX_FORCE_INLINE agx::UInt32 const& ContactConstraintInstance::jacobianIndex()
const { verifyIndex();
return getData()->jacobianIndex[getIndex()]; }
666 AGX_FORCE_INLINE agx::UInt32 const& ContactConstraintInstance::rowIndex()
const { verifyIndex();
return getData()->rowIndex[getIndex()]; }
668 AGX_FORCE_INLINE agx::UInt32& ContactConstraintInstance::materialIndex() { verifyIndex();
return getData()->materialIndex[getIndex()]; }
669 AGX_FORCE_INLINE agx::UInt32 const& ContactConstraintInstance::materialIndex()
const { verifyIndex();
return getData()->materialIndex[getIndex()]; }
671 AGX_FORCE_INLINE agx::UInt32& ContactConstraintInstance::iterationCount() { verifyIndex();
return getData()->iterationCount[getIndex()]; }
672 AGX_FORCE_INLINE agx::UInt32 const& ContactConstraintInstance::iterationCount()
const { verifyIndex();
return getData()->iterationCount[getIndex()]; }
674 AGX_FORCE_INLINE agx::Bool& ContactConstraintInstance::isImpacting() { verifyIndex();
return getData()->isImpacting[getIndex()]; }
675 AGX_FORCE_INLINE agx::Bool const& ContactConstraintInstance::isImpacting()
const { verifyIndex();
return getData()->isImpacting[getIndex()]; }
677 AGX_FORCE_INLINE agx::Real& ContactConstraintInstance::restingCompliance() { verifyIndex();
return getData()->restingCompliance[getIndex()]; }
678 AGX_FORCE_INLINE agx::Real const& ContactConstraintInstance::restingCompliance()
const { verifyIndex();
return getData()->restingCompliance[getIndex()]; }
680 AGX_FORCE_INLINE agx::Real& ContactConstraintInstance::charContactTime() { verifyIndex();
return getData()->charContactTime[getIndex()]; }
681 AGX_FORCE_INLINE agx::Real const& ContactConstraintInstance::charContactTime()
const { verifyIndex();
return getData()->charContactTime[getIndex()]; }
683 AGX_FORCE_INLINE agx::Real& ContactConstraintInstance::charMass() { verifyIndex();
return getData()->charMass[getIndex()]; }
684 AGX_FORCE_INLINE agx::Real const& ContactConstraintInstance::charMass()
const { verifyIndex();
return getData()->charMass[getIndex()]; }
689 AGX_FORCE_INLINE agx::Real& ContactConstraintInstance::nonlinearMultiplier() { verifyIndex();
return getData()->nonlinearMultiplier[getIndex()]; }
690 AGX_FORCE_INLINE agx::Real const& ContactConstraintInstance::nonlinearMultiplier()
const { verifyIndex();
return getData()->nonlinearMultiplier[getIndex()]; }
692 AGX_FORCE_INLINE agx::Real& ContactConstraintInstance::rollingResistanceMu() { verifyIndex();
return getData()->rollingResistanceMu[getIndex()]; }
693 AGX_FORCE_INLINE agx::Real const& ContactConstraintInstance::rollingResistanceMu()
const { verifyIndex();
return getData()->rollingResistanceMu[getIndex()]; }
695 AGX_FORCE_INLINE agx::Real& ContactConstraintInstance::twistLimitMultiplier() { verifyIndex();
return getData()->twistLimitMultiplier[getIndex()]; }
696 AGX_FORCE_INLINE agx::Real const& ContactConstraintInstance::twistLimitMultiplier()
const { verifyIndex();
return getData()->twistLimitMultiplier[getIndex()]; }
699 AGX_FORCE_INLINE ContactConstraintSemantics::ContactConstraintSemantics() {}
707 AGX_TYPE_BINDING(
agx::Physics::GranularBody::ContactConstraintInstance, "Physics.GranularBody.ContactConstraintInstance")
710 # pragma warning(pop)
713 #undef AGX_ENTITY_WRAPPER
714 #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...
agx::Index calculateIndex() const
Calculate the index using the indirect id.
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.
EntityPtr & operator=(const EntityPtr &other)=default
Data storage for a collection of entity instances of a specified EntityModel.
agx::String fullPath() const
AGXPHYSICS_EXPORT agx::UInt & body2()
AGXPHYSICS_EXPORT agx::UInt & body1()
AGXPHYSICS_EXPORT agx::Bool & isImpacting()
AGXPHYSICS_EXPORT agx::UInt & jacobianIndex()
AGXPHYSICS_EXPORT agx::UInt & rowIndex()
Abstract description of the data attributes for the Physics.GranularBody.ContactConstraint entity.
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
static ContactConstraintModel * instance()
static agxData::ScalarAttributeT< agx::Real > * charContactTimeAttribute
static agxData::ScalarAttributeT< agx::Real > * charMassAttribute
virtual void construct(agxData::EntityPtr instance) override
static agxData::ScalarAttributeT< agx::UInt32 > * solveBody1Attribute
virtual void initAttributeAccessors() override
static agxData::ScalarAttributeT< agx::UInt32 > * body2Attribute
ContactConstraintPtr PtrT
virtual ~ContactConstraintModel()
static agxData::ScalarAttributeT< agx::UInt32 > * jacobianIndexAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * body1Attribute
ContactConstraintModel(const agx::String &name="ContactConstraint")
static agxData::ScalarAttributeT< agx::Real > * restingComplianceAttribute
static agxData::ScalarAttributeT< agx::Real > * rollingResistanceMuAttribute
static agxData::ScalarAttributeT< agx::Bool > * isImpactingAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * solveBody2Attribute
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 > * iterationCountAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * cachedContactIdAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * materialIndexAttribute
static agxData::EntityStorage * defaultStorage()
static agxData::ScalarAttributeT< agx::Real > * nonlinearMultiplierAttribute
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::ScalarAttributeT< agx::Real > * twistLimitMultiplierAttribute
static agxData::ScalarAttributeT< agx::JacobianMeta > * GMetaAttribute
virtual void configure(agx::TiXmlElement *eEntity) override
static agxData::ScalarAttributeT< agx::UInt32 > * contactIndexAttribute
void construct(agx::Physics::GranularBody::ContactConstraintPtr contactConstraint)
static agxData::ScalarAttributeT< agx::UInt32 > * rowIndexAttribute
Pointer to a entity instance of type Physics.GranularBody.ContactConstraint.
AGXPHYSICS_EXPORT agx::Real & charContactTime()
AGXPHYSICS_EXPORT agx::Real & restingCompliance()
AGXPHYSICS_EXPORT ContactConstraintPtr()
AGXPHYSICS_EXPORT const ContactConstraintInstance instance() const
AGXPHYSICS_EXPORT agx::JacobianMeta const & GMeta() const
AGXPHYSICS_EXPORT ContactConstraintPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::Real const & charContactTime() const
AGXPHYSICS_EXPORT agx::UInt32 & jacobianIndex()
AGXPHYSICS_EXPORT agx::UInt32 & solveBody1()
AGXPHYSICS_EXPORT agx::UInt32 const & solveBody1() const
AGXPHYSICS_EXPORT agx::UInt32 const & rowIndex() const
AGXPHYSICS_EXPORT agx::UInt32 const & body1() const
AGXPHYSICS_EXPORT agx::UInt32 & rowIndex()
AGXPHYSICS_EXPORT ContactConstraintInstance instance()
AGXPHYSICS_EXPORT agx::UInt32 & body1()
AGXPHYSICS_EXPORT agx::Real & rollingResistanceMu()
AGXPHYSICS_EXPORT agx::UInt32 & materialIndex()
AGXPHYSICS_EXPORT agx::Real const & restingCompliance() const
ContactConstraintData * getData()
AGXPHYSICS_EXPORT agx::Bool const & isImpacting() const
AGXPHYSICS_EXPORT agx::UInt32 & iterationCount()
const ContactConstraintData * getData() const
AGXPHYSICS_EXPORT agx::JacobianMeta & GMeta()
AGXPHYSICS_EXPORT agx::UInt32 const & contactIndex() const
AGXPHYSICS_EXPORT agx::Real const & charMass() const
AGXPHYSICS_EXPORT agx::Bool & isImpacting()
ContactConstraintData DataType
AGXPHYSICS_EXPORT agx::UInt32 & contactIndex()
AGXPHYSICS_EXPORT agx::UInt32 & solveBody2()
ContactConstraintInstance InstanceType
AGXPHYSICS_EXPORT agx::Real const & nonlinearMultiplier() const
AGXPHYSICS_EXPORT agx::Real & charMass()
AGXPHYSICS_EXPORT const ContactConstraintSemantics * operator->() const
AGXPHYSICS_EXPORT agx::UInt32 const & cachedContactId() const
AGXPHYSICS_EXPORT ContactConstraintPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agx::UInt32 const & jacobianIndex() const
AGXPHYSICS_EXPORT agx::UInt32 const & iterationCount() const
AGXPHYSICS_EXPORT agx::UInt32 const & body2() const
AGXPHYSICS_EXPORT agx::UInt32 const & solveBody2() const
AGXPHYSICS_EXPORT agx::Real & nonlinearMultiplier()
AGXPHYSICS_EXPORT agx::Real const & twistLimitMultiplier() const
ContactConstraintModel ModelType
AGXPHYSICS_EXPORT agx::UInt32 const & materialIndex() const
AGXPHYSICS_EXPORT ContactConstraintSemantics * operator->()
AGXPHYSICS_EXPORT agx::UInt32 & body2()
AGXPHYSICS_EXPORT ContactConstraintPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Real & twistLimitMultiplier()
AGXPHYSICS_EXPORT agx::Real const & rollingResistanceMu() const
AGXPHYSICS_EXPORT agx::UInt32 & cachedContactId()
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())