21 #ifndef GENERATED_AGX_PHYSICS_PARTICLEGEOMETRYCONTACT_H_PLUGIN 22 #define GENERATED_AGX_PHYSICS_PARTICLEGEOMETRYCONTACT_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 ) 53 namespace agx {
namespace Physics {
class GeometryPtr; }}
60 class ParticleGeometryContactModel;
61 class ParticleGeometryContactData;
62 class ParticleGeometryContactPtr;
63 class ParticleGeometryContactInstance;
64 class ParticleGeometryContactSemantics;
89 virtual void shutdownCleanup()
override;
120 virtual void configure(agx::TiXmlElement* eEntity)
override;
121 virtual void initAttributeAccessors()
override;
128 #ifndef AGX_PHYSICS_PARTICLEGEOMETRYCONTACT_DATA_SET_OVERRIDE 129 #define AGX_PHYSICS_PARTICLEGEOMETRYCONTACT_DATA_SET 130 class AGXPHYSICS_EXPORT ParticleGeometryContactData :
public agx::Physics::ContactData
133 ParticleGeometryContactInstance operator[] (
size_t index);
186 ParticleGeometryContactData();
189 virtual ~ParticleGeometryContactData() {}
190 virtual void setNumElements(
agx::Index numElements)
override;
193 ParticleGeometryContactData& operator= (
const ParticleGeometryContactData&) {
return *
this; }
201 class
AGXPHYSICS_EXPORT ParticleGeometryContactSemantics : public
agx::Physics::ContactSemantics
222 agx::Real const& getImpactNormalForce()
const;
223 agx::Real const& getContactEnergy()
const;
247 void setLocalForce(
agx::Vec3 const& value);
248 void setImpactNormalForce(
agx::Real const& value);
249 void setContactEnergy(
agx::Real const& value);
250 void setIsImpacting(
agx::Bool const& value);
253 void setNext(
agx::Int const& value);
258 friend class ParticleGeometryContactInstance;
259 ParticleGeometryContactSemantics();
287 ParticleGeometryContactData* getData();
288 const ParticleGeometryContactData* getData()
const;
408 ParticleGeometryContactInstance();
409 ParticleGeometryContactInstance(ParticleGeometryContactData* data,
agx::Index index);
414 ParticleGeometryContactData* getData();
415 const ParticleGeometryContactData* getData()
const;
501 agx::Real const& impactNormalForce()
const;
542 inline ParticleGeometryContactInstance
agx::Physics::ParticleGeometryContactData::operator[] (
size_t index) {
return ParticleGeometryContactInstance(
this, (
agx::Index)index); }
549 "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\'",
564 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
573 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
652 AGX_FORCE_INLINE ParticleGeometryContactInstance::ParticleGeometryContactInstance() {}
653 AGX_FORCE_INLINE ParticleGeometryContactInstance::ParticleGeometryContactInstance(ParticleGeometryContactData* data,
agx::Index index) : agx::Physics::ContactInstance(data, index) {}
658 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
665 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
673 AGX_FORCE_INLINE agx::UInt32& ParticleGeometryContactInstance::particle() { verifyIndex();
return getData()->particle[getIndex()]; }
674 AGX_FORCE_INLINE agx::UInt32 const& ParticleGeometryContactInstance::particle()
const { verifyIndex();
return getData()->particle[getIndex()]; }
676 AGX_FORCE_INLINE agx::UInt32& ParticleGeometryContactInstance::geometry() { verifyIndex();
return getData()->geometry[getIndex()]; }
677 AGX_FORCE_INLINE agx::UInt32 const& ParticleGeometryContactInstance::geometry()
const { verifyIndex();
return getData()->geometry[getIndex()]; }
680 AGX_FORCE_INLINE agx::UInt32 const& ParticleGeometryContactInstance::body()
const { verifyIndex();
return getData()->body[getIndex()]; }
682 AGX_FORCE_INLINE agx::UInt32& ParticleGeometryContactInstance::particleId() { verifyIndex();
return getData()->particleId[getIndex()]; }
683 AGX_FORCE_INLINE agx::UInt32 const& ParticleGeometryContactInstance::particleId()
const { verifyIndex();
return getData()->particleId[getIndex()]; }
685 AGX_FORCE_INLINE agx::UInt32& ParticleGeometryContactInstance::geometryId() { verifyIndex();
return getData()->geometryId[getIndex()]; }
686 AGX_FORCE_INLINE agx::UInt32 const& ParticleGeometryContactInstance::geometryId()
const { verifyIndex();
return getData()->geometryId[getIndex()]; }
691 AGX_FORCE_INLINE agx::UInt32& ParticleGeometryContactInstance::faceIndex() { verifyIndex();
return getData()->faceIndex[getIndex()]; }
692 AGX_FORCE_INLINE agx::UInt32 const& ParticleGeometryContactInstance::faceIndex()
const { verifyIndex();
return getData()->faceIndex[getIndex()]; }
694 AGX_FORCE_INLINE agx::UInt8& ParticleGeometryContactInstance::faceFeature() { verifyIndex();
return getData()->faceFeature[getIndex()]; }
695 AGX_FORCE_INLINE agx::UInt8 const& ParticleGeometryContactInstance::faceFeature()
const { verifyIndex();
return getData()->faceFeature[getIndex()]; }
697 AGX_FORCE_INLINE agx::Bool& ParticleGeometryContactInstance::enabled() { verifyIndex();
return getData()->enabled[getIndex()]; }
698 AGX_FORCE_INLINE agx::Bool const& ParticleGeometryContactInstance::enabled()
const { verifyIndex();
return getData()->enabled[getIndex()]; }
700 AGX_FORCE_INLINE agx::Vec3& ParticleGeometryContactInstance::point() { verifyIndex();
return getData()->point[getIndex()]; }
701 AGX_FORCE_INLINE agx::Vec3 const& ParticleGeometryContactInstance::point()
const { verifyIndex();
return getData()->point[getIndex()]; }
703 AGX_FORCE_INLINE agx::Vec3f& ParticleGeometryContactInstance::normal() { verifyIndex();
return getData()->normal[getIndex()]; }
704 AGX_FORCE_INLINE agx::Vec3f const& ParticleGeometryContactInstance::normal()
const { verifyIndex();
return getData()->normal[getIndex()]; }
706 AGX_FORCE_INLINE agx::Vec3f& ParticleGeometryContactInstance::tangentU() { verifyIndex();
return getData()->tangentU[getIndex()]; }
707 AGX_FORCE_INLINE agx::Vec3f const& ParticleGeometryContactInstance::tangentU()
const { verifyIndex();
return getData()->tangentU[getIndex()]; }
709 AGX_FORCE_INLINE agx::Vec3f& ParticleGeometryContactInstance::tangentV() { verifyIndex();
return getData()->tangentV[getIndex()]; }
710 AGX_FORCE_INLINE agx::Vec3f const& ParticleGeometryContactInstance::tangentV()
const { verifyIndex();
return getData()->tangentV[getIndex()]; }
712 AGX_FORCE_INLINE agx::Real& ParticleGeometryContactInstance::depth() { verifyIndex();
return getData()->depth[getIndex()]; }
713 AGX_FORCE_INLINE agx::Real const& ParticleGeometryContactInstance::depth()
const { verifyIndex();
return getData()->depth[getIndex()]; }
715 AGX_FORCE_INLINE agx::Vec3f& ParticleGeometryContactInstance::velocity() { verifyIndex();
return getData()->velocity[getIndex()]; }
716 AGX_FORCE_INLINE agx::Vec3f const& ParticleGeometryContactInstance::velocity()
const { verifyIndex();
return getData()->velocity[getIndex()]; }
718 AGX_FORCE_INLINE agx::Vec3& ParticleGeometryContactInstance::localForce() { verifyIndex();
return getData()->localForce[getIndex()]; }
719 AGX_FORCE_INLINE agx::Vec3 const& ParticleGeometryContactInstance::localForce()
const { verifyIndex();
return getData()->localForce[getIndex()]; }
721 AGX_FORCE_INLINE agx::Real& ParticleGeometryContactInstance::impactNormalForce() { verifyIndex();
return getData()->impactNormalForce[getIndex()]; }
722 AGX_FORCE_INLINE agx::Real const& ParticleGeometryContactInstance::impactNormalForce()
const { verifyIndex();
return getData()->impactNormalForce[getIndex()]; }
724 AGX_FORCE_INLINE agx::Real& ParticleGeometryContactInstance::contactEnergy() { verifyIndex();
return getData()->contactEnergy[getIndex()]; }
725 AGX_FORCE_INLINE agx::Real const& ParticleGeometryContactInstance::contactEnergy()
const { verifyIndex();
return getData()->contactEnergy[getIndex()]; }
727 AGX_FORCE_INLINE agx::Bool& ParticleGeometryContactInstance::isImpacting() { verifyIndex();
return getData()->isImpacting[getIndex()]; }
728 AGX_FORCE_INLINE agx::Bool const& ParticleGeometryContactInstance::isImpacting()
const { verifyIndex();
return getData()->isImpacting[getIndex()]; }
730 AGX_FORCE_INLINE agx::Real32& ParticleGeometryContactInstance::timeStamp() { verifyIndex();
return getData()->timeStamp[getIndex()]; }
731 AGX_FORCE_INLINE agx::Real32 const& ParticleGeometryContactInstance::timeStamp()
const { verifyIndex();
return getData()->timeStamp[getIndex()]; }
733 AGX_FORCE_INLINE agx::Real32& ParticleGeometryContactInstance::charContactTime() { verifyIndex();
return getData()->charContactTime[getIndex()]; }
734 AGX_FORCE_INLINE agx::Real32 const& ParticleGeometryContactInstance::charContactTime()
const { verifyIndex();
return getData()->charContactTime[getIndex()]; }
736 AGX_FORCE_INLINE agx::Int& ParticleGeometryContactInstance::next() { verifyIndex();
return getData()->next[getIndex()]; }
737 AGX_FORCE_INLINE agx::Int const& ParticleGeometryContactInstance::next()
const { verifyIndex();
return getData()->next[getIndex()]; }
740 AGX_FORCE_INLINE ParticleGeometryContactSemantics::ParticleGeometryContactSemantics() {}
747 AGX_TYPE_BINDING(agx::Physics::ParticleGeometryContactInstance,
"Physics.ParticleGeometryContactInstance")
750 # pragma warning(pop) 753 #undef AGX_ENTITY_WRAPPER 754 #undef AGX_ENTITY_NAMESPACE
Pointer to a entity instance of type Physics.ParticleGeometryContact.
agxData::EntityData * getData()
static agxData::ScalarAttributeT< agx::Vec3 > * localForceAttribute
static agxData::ScalarAttributeT< agx::Vec3f > * tangentVAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * faceIndexAttribute
ParticleGeometryContactData DataType
agxData::EntityInstance instance()
static agxData::ScalarAttributeT< agx::UInt32 > * particleIdAttribute
static agxData::ScalarAttributeT< agx::UInt8 > * faceFeatureAttribute
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr & geometryPtr()
Data storage for a collection of entity instances of a specified EntityModel.
#define agxAssertN(expr, format,...)
agxData::EntityData * getData()
agx::String fullPath() const
AGXPHYSICS_EXPORT agx::UInt32 & body()
AGXPHYSICS_EXPORT agx::Vec3f & tangentV()
static agxData::ScalarAttributeT< agx::UInt32 > * geometryAttribute
#define AGX_TYPE_BINDING(_Type, _Name)
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
AGXPHYSICS_EXPORT agx::Real32 & timeStamp()
static agxData::ScalarAttributeT< agx::Real > * contactEnergyAttribute
AGXPHYSICS_EXPORT agx::UInt32 & faceIndex()
The face index of shape 2 in contact (e.g. index of triangle for trimesh).
#define AGXPHYSICS_EXPORT
AGXPHYSICS_EXPORT agx::Vec3 & localForce()
Entity instance provides access to a single instance in an EntityStorage.
static agxData::ScalarAttributeT< agx::Vec3f > * tangentUAttribute
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
AGXPHYSICS_EXPORT agx::Vec3f & tangentU()
AGXPHYSICS_EXPORT agx::UInt32 & particleId()
#define AGX_DECLARE_POINTER_TYPES(type)
static agxData::ScalarAttributeT< agx::Vec3 > * pointAttribute
bool isInstanceOf(agxData::EntityModel *model) const
AGXPHYSICS_EXPORT agx::Real & depth()
AGXPHYSICS_EXPORT agx::Real & contactEnergy()
Type-specific Array used for fast access into the data held by a Buffer.
AGXPHYSICS_EXPORT agx::UInt32 & geometry()
static agxData::ScalarAttributeT< agx::Real > * depthAttribute
ParticleGeometryContactData * getData()
static agxData::ScalarAttributeT< agx::Bool > * enabledAttribute
static agxData::ScalarAttributeT< agx::Real32 > * charContactTimeAttribute
AGXPHYSICS_EXPORT agx::UInt32 & particle()
AGXPHYSICS_EXPORT ParticleGeometryContactPtr & operator=(const agxData::EntityPtr &ptr)
Vector containing 'raw' data.
EntityPtr & operator=(const EntityPtr &other)=default
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
ParticleGeometryContactInstance InstanceType
Abstract description of the data attributes for the Physics.ParticleGeometryContact entity...
static agxData::ScalarAttributeT< agx::Real > * impactNormalForceAttribute
AGXPHYSICS_EXPORT agx::Real32 & charContactTime()
Pointer to a entity instance of type Physics.Geometry.
AGXPHYSICS_EXPORT agx::Int & next()
static agxData::ScalarAttributeT< agx::Vec3f > * normalAttribute
Contains classes for low level data storage for AGX.
static agxData::ScalarAttributeT< agx::Physics::GeometryPtr > * geometryPtrAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * geometryIdAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * particleAttribute
static ParticleGeometryContactModel * instance()
static agxData::ScalarAttributeT< agx::Bool > * isImpactingAttribute
AGXPHYSICS_EXPORT agx::Real & impactNormalForce()
AGXPHYSICS_EXPORT agx::Bool & enabled()
AGXPHYSICS_EXPORT agx::Vec3 & point()
AGXPHYSICS_EXPORT agx::Vec3f & velocity()
ParticleGeometryContactModel ModelType
AGXPHYSICS_EXPORT ParticleGeometryContactSemantics * operator->()
bool isInstanceOf(agxData::EntityModel *model) const
AGXPHYSICS_EXPORT agx::Bool & isImpacting()
AGXPHYSICS_EXPORT agx::UInt32 & geometryId()
AGXPHYSICS_EXPORT agx::UInt8 & faceFeature()
The face feature of shape 2 in contact (e.g. voronoi region on triangle for trimesh).
AGXPHYSICS_EXPORT agx::Vec3f & normal()
AGXPHYSICS_EXPORT ParticleGeometryContactInstance instance()
static agxData::ScalarAttributeT< agx::UInt32 > * bodyAttribute
static agxData::ScalarAttributeT< agx::Vec3f > * velocityAttribute
#define DOXYGEN_END_INTERNAL_BLOCK()
static agxData::ScalarAttributeT< agx::Int > * nextAttribute
static agxData::ScalarAttributeT< agx::Real32 > * timeStampAttribute
#define DOXYGEN_START_INTERNAL_BLOCK()
ParticleGeometryContactPtr PtrT
AGXPHYSICS_EXPORT ParticleGeometryContactPtr()