21 #ifndef GENERATED_AGX_PHYSICS_GEOMETRY_H_PLUGIN 22 #define GENERATED_AGX_PHYSICS_GEOMETRY_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 ) 61 namespace agx {
namespace Physics {
namespace Geometry {
class ShapePtr; }}}
62 namespace agx {
namespace Physics {
class CollisionGroupSetPtr; }}
63 namespace agx {
namespace Physics {
class RigidBodyPtr; }}
64 namespace agx {
namespace Physics {
class MaterialPtr; }}
65 namespace agx {
namespace Physics {
class GeometryPtr; }}
75 class GeometryInstance;
76 class GeometrySemantics;
101 virtual void shutdownCleanup()
override;
130 virtual void configure(agx::TiXmlElement* eEntity)
override;
131 virtual void initAttributeAccessors()
override;
138 #ifndef AGX_PHYSICS_GEOMETRY_DATA_SET_OVERRIDE 139 #define AGX_PHYSICS_GEOMETRY_DATA_SET 143 GeometryInstance operator[] (
size_t index);
170 typedef agxCollide::GeometryState stateType;
195 virtual ~GeometryData() {}
196 virtual void setNumElements(
agx::Index numElements)
override;
199 GeometryData& operator= (
const GeometryData&) {
return *
this; }
213 agxCollide::GeometryState
const& getState()
const;
218 agx::Real const& getBoundingRadius()
const;
219 agx::Vec3 const& getLocalBoundCenter()
const;
224 agx::UInt const& getOrientedBoundId()
const;
237 void setState(agxCollide::GeometryState
const& value);
242 void setBoundingRadius(
agx::Real const& value);
243 void setLocalBoundCenter(
agx::Vec3 const& value);
248 void setOrientedBoundId(
agx::UInt const& value);
250 void setSweepAndPruneIndex(
agx::UInt32 const& value);
252 void setSurfaceVelocity(
agx::Vec3f const& value);
260 friend class GeometryInstance;
289 GeometryData* getData();
290 const GeometryData* getData()
const;
404 GeometryInstance(GeometryData* data,
agx::Index index);
409 GeometryData* getData();
410 const GeometryData* getData()
const;
419 agxCollide::GeometryState& state();
421 agxCollide::GeometryState
const& state()
const;
451 agx::Vec3 const& localBoundCenter()
const;
476 agx::UInt const& orientedBoundId()
const;
527 inline GeometryInstance
agx::Physics::GeometryData::operator[] (
size_t index) {
return GeometryInstance(
this, (
agx::Index)index); }
534 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
541 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
549 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
558 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
565 AGX_FORCE_INLINE GeometrySemantics* GeometryPtr::operator->() {
return (GeometrySemantics* )
this; }
566 AGX_FORCE_INLINE const GeometrySemantics* GeometryPtr::operator->()
const {
return (
const GeometrySemantics* )
this; }
573 AGX_FORCE_INLINE agxCollide::GeometryState& GeometryPtr::state() { verifyIndex();
return getData()->state[calculateIndex()]; }
574 AGX_FORCE_INLINE agxCollide::GeometryState
const& GeometryPtr::state()
const { verifyIndex();
return getData()->state[calculateIndex()]; }
588 AGX_FORCE_INLINE agx::Real& GeometryPtr::boundingRadius() { verifyIndex();
return getData()->boundingRadius[calculateIndex()]; }
589 AGX_FORCE_INLINE agx::Real const& GeometryPtr::boundingRadius()
const { verifyIndex();
return getData()->boundingRadius[calculateIndex()]; }
591 AGX_FORCE_INLINE agx::Vec3& GeometryPtr::localBoundCenter() { verifyIndex();
return getData()->localBoundCenter[calculateIndex()]; }
592 AGX_FORCE_INLINE agx::Vec3 const& GeometryPtr::localBoundCenter()
const { verifyIndex();
return getData()->localBoundCenter[calculateIndex()]; }
598 AGX_FORCE_INLINE agx::UInt32 const& GeometryPtr::cellIndex()
const { verifyIndex();
return getData()->cellIndex[calculateIndex()]; }
606 AGX_FORCE_INLINE agx::UInt& GeometryPtr::orientedBoundId() { verifyIndex();
return getData()->orientedBoundId[calculateIndex()]; }
607 AGX_FORCE_INLINE agx::UInt const& GeometryPtr::orientedBoundId()
const { verifyIndex();
return getData()->orientedBoundId[calculateIndex()]; }
612 AGX_FORCE_INLINE agx::UInt32& GeometryPtr::sweepAndPruneIndex() { verifyIndex();
return getData()->sweepAndPruneIndex[calculateIndex()]; }
613 AGX_FORCE_INLINE agx::UInt32 const& GeometryPtr::sweepAndPruneIndex()
const { verifyIndex();
return getData()->sweepAndPruneIndex[calculateIndex()]; }
618 AGX_FORCE_INLINE agx::Vec3f& GeometryPtr::surfaceVelocity() { verifyIndex();
return getData()->surfaceVelocity[calculateIndex()]; }
619 AGX_FORCE_INLINE agx::Vec3f const& GeometryPtr::surfaceVelocity()
const { verifyIndex();
return getData()->surfaceVelocity[calculateIndex()]; }
632 AGX_FORCE_INLINE GeometryInstance::GeometryInstance(GeometryData* data,
agx::Index index) : agx::ReferencedInstance(data, index) {}
637 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
644 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
655 AGX_FORCE_INLINE agxCollide::GeometryState& GeometryInstance::state() { verifyIndex();
return getData()->state[getIndex()]; }
656 AGX_FORCE_INLINE agxCollide::GeometryState
const& GeometryInstance::state()
const { verifyIndex();
return getData()->state[getIndex()]; }
670 AGX_FORCE_INLINE agx::Real& GeometryInstance::boundingRadius() { verifyIndex();
return getData()->boundingRadius[getIndex()]; }
671 AGX_FORCE_INLINE agx::Real const& GeometryInstance::boundingRadius()
const { verifyIndex();
return getData()->boundingRadius[getIndex()]; }
673 AGX_FORCE_INLINE agx::Vec3& GeometryInstance::localBoundCenter() { verifyIndex();
return getData()->localBoundCenter[getIndex()]; }
674 AGX_FORCE_INLINE agx::Vec3 const& GeometryInstance::localBoundCenter()
const { verifyIndex();
return getData()->localBoundCenter[getIndex()]; }
680 AGX_FORCE_INLINE agx::UInt32 const& GeometryInstance::cellIndex()
const { verifyIndex();
return getData()->cellIndex[getIndex()]; }
688 AGX_FORCE_INLINE agx::UInt& GeometryInstance::orientedBoundId() { verifyIndex();
return getData()->orientedBoundId[getIndex()]; }
689 AGX_FORCE_INLINE agx::UInt const& GeometryInstance::orientedBoundId()
const { verifyIndex();
return getData()->orientedBoundId[getIndex()]; }
694 AGX_FORCE_INLINE agx::UInt32& GeometryInstance::sweepAndPruneIndex() { verifyIndex();
return getData()->sweepAndPruneIndex[getIndex()]; }
695 AGX_FORCE_INLINE agx::UInt32 const& GeometryInstance::sweepAndPruneIndex()
const { verifyIndex();
return getData()->sweepAndPruneIndex[getIndex()]; }
700 AGX_FORCE_INLINE agx::Vec3f& GeometryInstance::surfaceVelocity() { verifyIndex();
return getData()->surfaceVelocity[getIndex()]; }
701 AGX_FORCE_INLINE agx::Vec3f const& GeometryInstance::surfaceVelocity()
const { verifyIndex();
return getData()->surfaceVelocity[getIndex()]; }
720 AGX_TYPE_BINDING(agx::Physics::GeometryInstance,
"Physics.GeometryInstance")
723 # pragma warning(pop) 726 #undef AGX_ENTITY_WRAPPER 727 #undef AGX_ENTITY_NAMESPACE static agxData::ScalarAttributeT< agx::UInt32 > * sweepAndPruneIndexAttribute
agxData::EntityData * getData()
static agxData::ScalarAttributeT< agx::Physics::CollisionGroupSetPtr > * collisionGroupSetAttribute
agxData::EntityInstance instance()
Abstract description of the data attributes for the Physics.Geometry entity.
Data storage for a collection of entity instances of a specified EntityModel.
static agxData::ScalarAttributeT< agx::Physics::MaterialPtr > * materialAttribute
This namespace consists of a set of classes for handling geometric intersection tests including boole...
static agxData::ScalarAttributeT< agx::UInt32 > * oldCellAttribute
Pointer to a entity instance of type Physics.Material.
static agxData::ScalarAttributeT< agx::UInt8 > * tierAttribute
#define agxAssertN(expr, format,...)
agxData::EntityData * getData()
agx::String fullPath() const
#define AGX_TYPE_BINDING(_Type, _Name)
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
static agxData::ScalarAttributeT< agx::Real > * boundingRadiusAttribute
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
#define AGXPHYSICS_EXPORT
Pointer to a entity instance of type Physics.Geometry.Shape.
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...
static agxData::ScalarAttributeT< agx::AffineMatrix4x4 > * localTransformAttribute
bool isInstanceOf(agxData::EntityModel *model) const
Representation of a name string.
Type-specific Array used for fast access into the data held by a Buffer.
Pointer to a entity instance of type Physics.CollisionGroupSet.
static agxData::ScalarAttributeT< agxCollide::BoundingAABB > * boundingAABBAttribute
The geometry representation used by the collision detection engine.
static agxData::ScalarAttributeT< agx::UInt16 > * cellSlotAttribute
Pointer to a entity instance of type Physics.RigidBody.
static agxData::ScalarAttributeT< agx::Name > * nameAttribute
Vector containing 'raw' data.
EntityPtr & operator=(const EntityPtr &other)=default
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
GeometryInstance InstanceType
Pointer to a entity instance of type Physics.Geometry.
Contains classes for low level data storage for AGX.
static agxData::ScalarAttributeT< agx::Physics::Geometry::ShapePtr > * shapeAttribute
static agxData::ScalarAttributeT< agx::Physics::RigidBodyPtr > * bodyAttribute
static agxData::PointerAttributeT< agxCollide::Geometry * > * modelAttribute
Abstract description of the data attributes for the Referenced entity.
static agxData::ScalarAttributeT< agx::Vec3 > * localBoundCenterAttribute
static agxData::ScalarAttributeT< agx::AffineMatrix4x4 > * transformAttribute
bool isInstanceOf(agxData::EntityModel *model) const
static agxData::ScalarAttributeT< agxCollide::GeometryState > * stateAttribute
Pointer to a entity instance of type Referenced.
agx::ref_ptr< Geometry > GeometryRef
Axis aligned bounding box implementation.
static agxData::ScalarAttributeT< agx::UInt32 > * cellIndexAttribute
static agxData::ScalarAttributeT< agx::Vec3f > * surfaceVelocityAttribute
static agxData::ScalarAttributeT< agx::UInt > * orientedBoundIdAttribute
static agxData::ScalarAttributeT< agx::Physics::GeometryPtr > * nextAttribute
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
AGX_DECLARE_POINTER_TYPES(SpaceListener)