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;
403 #ifdef AGX_GENERATED_TOLUA_WRAPPER 404 inline agx::UInt32 const& getParticle()
const {
return (*this)->getParticle(); }
405 inline agx::UInt32 const& getGeometry()
const {
return (*this)->getGeometry(); }
406 inline agx::UInt32 const& getBody()
const {
return (*this)->getBody(); }
407 inline agx::UInt32 const& getParticleId()
const {
return (*this)->getParticleId(); }
408 inline agx::UInt32 const& getGeometryId()
const {
return (*this)->getGeometryId(); }
410 inline agx::UInt32 const& getFaceIndex()
const {
return (*this)->getFaceIndex(); }
411 inline agx::UInt8 const& getFaceFeature()
const {
return (*this)->getFaceFeature(); }
412 inline agx::Bool const& getEnabled()
const {
return (*this)->getEnabled(); }
413 inline agx::Vec3 const& getPoint()
const {
return (*this)->getPoint(); }
414 inline agx::Vec3f const& getNormal()
const {
return (*this)->getNormal(); }
415 inline agx::Vec3f const& getTangentU()
const {
return (*this)->getTangentU(); }
416 inline agx::Vec3f const& getTangentV()
const {
return (*this)->getTangentV(); }
417 inline agx::Real const& getDepth()
const {
return (*this)->getDepth(); }
418 inline agx::Vec3f const& getVelocity()
const {
return (*this)->getVelocity(); }
419 inline agx::Vec3 const& getLocalForce()
const {
return (*this)->getLocalForce(); }
420 inline agx::Real const& getImpactNormalForce()
const {
return (*this)->getImpactNormalForce(); }
421 inline agx::Real const& getContactEnergy()
const {
return (*this)->getContactEnergy(); }
422 inline agx::Bool const& getIsImpacting()
const {
return (*this)->getIsImpacting(); }
423 inline agx::Real32 const& getTimeStamp()
const {
return (*this)->getTimeStamp(); }
424 inline agx::Real32 const& getCharContactTime()
const {
return (*this)->getCharContactTime(); }
425 inline agx::Int const& getNext()
const {
return (*this)->getNext(); }
428 inline void setParticle(
agx::UInt32 const& value) { (*this)->setParticle(value); }
429 inline void setGeometry(
agx::UInt32 const& value) { (*this)->setGeometry(value); }
430 inline void setBody(
agx::UInt32 const& value) { (*this)->setBody(value); }
431 inline void setParticleId(
agx::UInt32 const& value) { (*this)->setParticleId(value); }
432 inline void setGeometryId(
agx::UInt32 const& value) { (*this)->setGeometryId(value); }
434 inline void setFaceIndex(
agx::UInt32 const& value) { (*this)->setFaceIndex(value); }
435 inline void setFaceFeature(
agx::UInt8 const& value) { (*this)->setFaceFeature(value); }
436 inline void setEnabled(
agx::Bool const& value) { (*this)->setEnabled(value); }
437 inline void setPoint(
agx::Vec3 const& value) { (*this)->setPoint(value); }
438 inline void setNormal(
agx::Vec3f const& value) { (*this)->setNormal(value); }
439 inline void setTangentU(
agx::Vec3f const& value) { (*this)->setTangentU(value); }
440 inline void setTangentV(
agx::Vec3f const& value) { (*this)->setTangentV(value); }
441 inline void setDepth(
agx::Real const& value) { (*this)->setDepth(value); }
442 inline void setVelocity(
agx::Vec3f const& value) { (*this)->setVelocity(value); }
443 inline void setLocalForce(
agx::Vec3 const& value) { (*this)->setLocalForce(value); }
444 inline void setImpactNormalForce(
agx::Real const& value) { (*this)->setImpactNormalForce(value); }
445 inline void setContactEnergy(
agx::Real const& value) { (*this)->setContactEnergy(value); }
446 inline void setIsImpacting(
agx::Bool const& value) { (*this)->setIsImpacting(value); }
447 inline void setTimeStamp(
agx::Real32 const& value) { (*this)->setTimeStamp(value); }
448 inline void setCharContactTime(
agx::Real32 const& value) { (*this)->setCharContactTime(value); }
449 inline void setNext(
agx::Int const& value) { (*this)->setNext(value); }
460 ParticleGeometryContactInstance();
461 ParticleGeometryContactInstance(ParticleGeometryContactData* data,
agx::Index index);
466 ParticleGeometryContactData* getData();
467 const ParticleGeometryContactData* getData()
const;
553 agx::Real const& impactNormalForce()
const;
594 inline ParticleGeometryContactInstance
agx::Physics::ParticleGeometryContactData::operator[] (
size_t index) {
return ParticleGeometryContactInstance(
this, (
agx::Index)index); }
601 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
608 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
616 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
625 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
704 AGX_FORCE_INLINE ParticleGeometryContactInstance::ParticleGeometryContactInstance() {}
705 AGX_FORCE_INLINE ParticleGeometryContactInstance::ParticleGeometryContactInstance(ParticleGeometryContactData* data,
agx::Index index) : agx::Physics::ContactInstance(data, index) {}
710 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
717 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
725 AGX_FORCE_INLINE agx::UInt32& ParticleGeometryContactInstance::particle() { verifyIndex();
return getData()->particle[getIndex()]; }
726 AGX_FORCE_INLINE agx::UInt32 const& ParticleGeometryContactInstance::particle()
const { verifyIndex();
return getData()->particle[getIndex()]; }
728 AGX_FORCE_INLINE agx::UInt32& ParticleGeometryContactInstance::geometry() { verifyIndex();
return getData()->geometry[getIndex()]; }
729 AGX_FORCE_INLINE agx::UInt32 const& ParticleGeometryContactInstance::geometry()
const { verifyIndex();
return getData()->geometry[getIndex()]; }
732 AGX_FORCE_INLINE agx::UInt32 const& ParticleGeometryContactInstance::body()
const { verifyIndex();
return getData()->body[getIndex()]; }
734 AGX_FORCE_INLINE agx::UInt32& ParticleGeometryContactInstance::particleId() { verifyIndex();
return getData()->particleId[getIndex()]; }
735 AGX_FORCE_INLINE agx::UInt32 const& ParticleGeometryContactInstance::particleId()
const { verifyIndex();
return getData()->particleId[getIndex()]; }
737 AGX_FORCE_INLINE agx::UInt32& ParticleGeometryContactInstance::geometryId() { verifyIndex();
return getData()->geometryId[getIndex()]; }
738 AGX_FORCE_INLINE agx::UInt32 const& ParticleGeometryContactInstance::geometryId()
const { verifyIndex();
return getData()->geometryId[getIndex()]; }
743 AGX_FORCE_INLINE agx::UInt32& ParticleGeometryContactInstance::faceIndex() { verifyIndex();
return getData()->faceIndex[getIndex()]; }
744 AGX_FORCE_INLINE agx::UInt32 const& ParticleGeometryContactInstance::faceIndex()
const { verifyIndex();
return getData()->faceIndex[getIndex()]; }
746 AGX_FORCE_INLINE agx::UInt8& ParticleGeometryContactInstance::faceFeature() { verifyIndex();
return getData()->faceFeature[getIndex()]; }
747 AGX_FORCE_INLINE agx::UInt8 const& ParticleGeometryContactInstance::faceFeature()
const { verifyIndex();
return getData()->faceFeature[getIndex()]; }
749 AGX_FORCE_INLINE agx::Bool& ParticleGeometryContactInstance::enabled() { verifyIndex();
return getData()->enabled[getIndex()]; }
750 AGX_FORCE_INLINE agx::Bool const& ParticleGeometryContactInstance::enabled()
const { verifyIndex();
return getData()->enabled[getIndex()]; }
752 AGX_FORCE_INLINE agx::Vec3& ParticleGeometryContactInstance::point() { verifyIndex();
return getData()->point[getIndex()]; }
753 AGX_FORCE_INLINE agx::Vec3 const& ParticleGeometryContactInstance::point()
const { verifyIndex();
return getData()->point[getIndex()]; }
755 AGX_FORCE_INLINE agx::Vec3f& ParticleGeometryContactInstance::normal() { verifyIndex();
return getData()->normal[getIndex()]; }
756 AGX_FORCE_INLINE agx::Vec3f const& ParticleGeometryContactInstance::normal()
const { verifyIndex();
return getData()->normal[getIndex()]; }
758 AGX_FORCE_INLINE agx::Vec3f& ParticleGeometryContactInstance::tangentU() { verifyIndex();
return getData()->tangentU[getIndex()]; }
759 AGX_FORCE_INLINE agx::Vec3f const& ParticleGeometryContactInstance::tangentU()
const { verifyIndex();
return getData()->tangentU[getIndex()]; }
761 AGX_FORCE_INLINE agx::Vec3f& ParticleGeometryContactInstance::tangentV() { verifyIndex();
return getData()->tangentV[getIndex()]; }
762 AGX_FORCE_INLINE agx::Vec3f const& ParticleGeometryContactInstance::tangentV()
const { verifyIndex();
return getData()->tangentV[getIndex()]; }
764 AGX_FORCE_INLINE agx::Real& ParticleGeometryContactInstance::depth() { verifyIndex();
return getData()->depth[getIndex()]; }
765 AGX_FORCE_INLINE agx::Real const& ParticleGeometryContactInstance::depth()
const { verifyIndex();
return getData()->depth[getIndex()]; }
767 AGX_FORCE_INLINE agx::Vec3f& ParticleGeometryContactInstance::velocity() { verifyIndex();
return getData()->velocity[getIndex()]; }
768 AGX_FORCE_INLINE agx::Vec3f const& ParticleGeometryContactInstance::velocity()
const { verifyIndex();
return getData()->velocity[getIndex()]; }
770 AGX_FORCE_INLINE agx::Vec3& ParticleGeometryContactInstance::localForce() { verifyIndex();
return getData()->localForce[getIndex()]; }
771 AGX_FORCE_INLINE agx::Vec3 const& ParticleGeometryContactInstance::localForce()
const { verifyIndex();
return getData()->localForce[getIndex()]; }
773 AGX_FORCE_INLINE agx::Real& ParticleGeometryContactInstance::impactNormalForce() { verifyIndex();
return getData()->impactNormalForce[getIndex()]; }
774 AGX_FORCE_INLINE agx::Real const& ParticleGeometryContactInstance::impactNormalForce()
const { verifyIndex();
return getData()->impactNormalForce[getIndex()]; }
776 AGX_FORCE_INLINE agx::Real& ParticleGeometryContactInstance::contactEnergy() { verifyIndex();
return getData()->contactEnergy[getIndex()]; }
777 AGX_FORCE_INLINE agx::Real const& ParticleGeometryContactInstance::contactEnergy()
const { verifyIndex();
return getData()->contactEnergy[getIndex()]; }
779 AGX_FORCE_INLINE agx::Bool& ParticleGeometryContactInstance::isImpacting() { verifyIndex();
return getData()->isImpacting[getIndex()]; }
780 AGX_FORCE_INLINE agx::Bool const& ParticleGeometryContactInstance::isImpacting()
const { verifyIndex();
return getData()->isImpacting[getIndex()]; }
782 AGX_FORCE_INLINE agx::Real32& ParticleGeometryContactInstance::timeStamp() { verifyIndex();
return getData()->timeStamp[getIndex()]; }
783 AGX_FORCE_INLINE agx::Real32 const& ParticleGeometryContactInstance::timeStamp()
const { verifyIndex();
return getData()->timeStamp[getIndex()]; }
785 AGX_FORCE_INLINE agx::Real32& ParticleGeometryContactInstance::charContactTime() { verifyIndex();
return getData()->charContactTime[getIndex()]; }
786 AGX_FORCE_INLINE agx::Real32 const& ParticleGeometryContactInstance::charContactTime()
const { verifyIndex();
return getData()->charContactTime[getIndex()]; }
788 AGX_FORCE_INLINE agx::Int& ParticleGeometryContactInstance::next() { verifyIndex();
return getData()->next[getIndex()]; }
789 AGX_FORCE_INLINE agx::Int const& ParticleGeometryContactInstance::next()
const { verifyIndex();
return getData()->next[getIndex()]; }
792 AGX_FORCE_INLINE ParticleGeometryContactSemantics::ParticleGeometryContactSemantics() {}
799 AGX_TYPE_BINDING(agx::Physics::ParticleGeometryContactInstance,
"Physics.ParticleGeometryContactInstance")
802 # pragma warning(pop) 805 #undef AGX_ENTITY_WRAPPER 806 #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
Namespace agx 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()