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;
88 virtual void shutdownCleanup()
override;
115 virtual void configure(agx::TiXmlElement* eEntity)
override;
116 virtual void initAttributeAccessors()
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; }
188 class
AGXPHYSICS_EXPORT ContactConstraintSemantics : protected agxData::EntityPtr
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();
266 ContactConstraintData* getData();
267 const ContactConstraintData* getData()
const;
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); }
408 class
AGXPHYSICS_EXPORT ContactConstraintInstance : public agxData::EntityInstance
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\'",
624 AGX_FORCE_INLINE ContactConstraintInstance::ContactConstraintInstance(ContactConstraintData* data,
agx::Index index) : agxData::EntityInstance(data, index) {}
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
static agxData::ScalarAttributeT< agx::UInt32 > * iterationCountAttribute
ContactConstraintPtr PtrT
static agxData::ScalarAttributeT< agx::UInt32 > * solveBody1Attribute
AGXPHYSICS_EXPORT agx::UInt & body2()
static agxData::ScalarAttributeT< agx::JacobianMeta > * GMetaAttribute
agxData::EntityData * getData()
static ContactConstraintModel * instance()
agx::Index calculateIndex() const
Calculate the index using the indirect id.
agxData::EntityInstance instance()
static agxData::ScalarAttributeT< agx::UInt32 > * body1Attribute
AGXPHYSICS_EXPORT ContactConstraintPtr()
Data storage for a collection of entity instances of a specified EntityModel.
#define agxAssertN(expr, format,...)
agxData::EntityData * getData()
#define AGX_TYPE_BINDING(_Type, _Name)
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
bool isInstanceOf(agxData::EntityModel *model) const
#define AGXPHYSICS_EXPORT
Entity instance provides access to a single instance in an EntityStorage.
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
#define AGX_DECLARE_POINTER_TYPES(type)
agx::String fullPath() const
ContactConstraintInstance InstanceType
static agxData::ScalarAttributeT< agx::Bool > * isImpactingAttribute
Type-specific Array used for fast access into the data held by a Buffer.
Vector containing 'raw' data.
EntityPtr & operator=(const EntityPtr &other)=default
static agxData::ScalarAttributeT< agx::UInt32 > * materialIndexAttribute
static agxData::ScalarAttributeT< agx::Real > * restingComplianceAttribute
AGXPHYSICS_EXPORT agx::Bool & isImpacting()
static agxData::ScalarAttributeT< agx::UInt32 > * solveBody2Attribute
void verifyIndex() const
Check for broken ptr, by verifying that the id is active in the storage.
static agxData::ScalarAttributeT< agx::Real > * nonlinearMultiplierAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * body2Attribute
AGXPHYSICS_EXPORT agx::UInt & rowIndex()
static agxData::ScalarAttributeT< agx::Real > * twistLimitMultiplierAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * contactIndexAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * cachedContactIdAttribute
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
static agxData::ScalarAttributeT< agx::Real > * rollingResistanceMuAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * jacobianIndexAttribute
static agxData::ScalarAttributeT< agx::Real > * charMassAttribute
bool isInstanceOf(agxData::EntityModel *model) const
ContactConstraintModel ModelType
Pointer to a entity instance of type Physics.GranularBody.ContactConstraint.
ContactConstraintData DataType
#define DOXYGEN_END_INTERNAL_BLOCK()
AGXPHYSICS_EXPORT agx::UInt & body1()
AGXPHYSICS_EXPORT agx::UInt & jacobianIndex()
#define DOXYGEN_START_INTERNAL_BLOCK()
static agxData::ScalarAttributeT< agx::UInt32 > * rowIndexAttribute
Abstract description of the data attributes for the Physics.GranularBody.ContactConstraint entity...
static agxData::ScalarAttributeT< agx::Real > * charContactTimeAttribute