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;
130 virtual void configure(agx::TiXmlElement* eEntity)
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);
259 friend class GeometryPtr;
260 friend class GeometryInstance;
395 #ifdef AGX_GENERATED_TOLUA_WRAPPER
396 inline agx::Name const& getName()
const {
return (*this)->getName(); }
397 inline agxCollide::GeometryState
const& getState()
const {
return (*this)->getState(); }
400 inline agx::AffineMatrix4x4 const& getLocalTransform()
const {
return (*this)->getLocalTransform(); }
402 inline agx::Real const& getBoundingRadius()
const {
return (*this)->getBoundingRadius(); }
403 inline agx::Vec3 const& getLocalBoundCenter()
const {
return (*this)->getLocalBoundCenter(); }
404 inline agx::UInt8 const& getTier()
const {
return (*this)->getTier(); }
405 inline agx::UInt32 const& getCellIndex()
const {
return (*this)->getCellIndex(); }
406 inline agx::UInt16 const& getCellSlot()
const {
return (*this)->getCellSlot(); }
407 inline agx::UInt32 const& getOldCell()
const {
return (*this)->getOldCell(); }
408 inline agx::UInt const& getOrientedBoundId()
const {
return (*this)->getOrientedBoundId(); }
410 inline agx::UInt32 const& getSweepAndPruneIndex()
const {
return (*this)->getSweepAndPruneIndex(); }
412 inline agx::Vec3f const& getSurfaceVelocity()
const {
return (*this)->getSurfaceVelocity(); }
418 inline void setName(
agx::Name const& value) { (*this)->setName(value); }
419 inline void setState(agxCollide::GeometryState
const& value) { (*this)->setState(value); }
422 inline void setLocalTransform(
agx::AffineMatrix4x4 const& value) { (*this)->setLocalTransform(value); }
424 inline void setBoundingRadius(
agx::Real const& value) { (*this)->setBoundingRadius(value); }
425 inline void setLocalBoundCenter(
agx::Vec3 const& value) { (*this)->setLocalBoundCenter(value); }
426 inline void setTier(
agx::UInt8 const& value) { (*this)->setTier(value); }
427 inline void setCellIndex(
agx::UInt32 const& value) { (*this)->setCellIndex(value); }
428 inline void setCellSlot(
agx::UInt16 const& value) { (*this)->setCellSlot(value); }
429 inline void setOldCell(
agx::UInt32 const& value) { (*this)->setOldCell(value); }
430 inline void setOrientedBoundId(
agx::UInt const& value) { (*this)->setOrientedBoundId(value); }
432 inline void setSweepAndPruneIndex(
agx::UInt32 const& value) { (*this)->setSweepAndPruneIndex(value); }
434 inline void setSurfaceVelocity(
agx::Vec3f const& value) { (*this)->setSurfaceVelocity(value); }
452 GeometryInstance(GeometryData* data,
agx::Index index);
457 GeometryData* getData();
458 const GeometryData* getData()
const;
467 agxCollide::GeometryState& state();
469 agxCollide::GeometryState
const& state()
const;
499 agx::Vec3 const& localBoundCenter()
const;
524 agx::UInt const& orientedBoundId()
const;
575 inline GeometryInstance
agx::Physics::GeometryData::operator[] (
size_t index) {
return GeometryInstance(
this, (
agx::Index)index); }
582 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
589 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
597 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
606 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
613 AGX_FORCE_INLINE GeometrySemantics* GeometryPtr::operator->() {
return (GeometrySemantics* )
this; }
614 AGX_FORCE_INLINE const GeometrySemantics* GeometryPtr::operator->()
const {
return (
const GeometrySemantics* )
this; }
621 AGX_FORCE_INLINE agxCollide::GeometryState& GeometryPtr::state() { verifyIndex();
return getData()->state[calculateIndex()]; }
622 AGX_FORCE_INLINE agxCollide::GeometryState
const& GeometryPtr::state()
const { verifyIndex();
return getData()->state[calculateIndex()]; }
636 AGX_FORCE_INLINE agx::Real& GeometryPtr::boundingRadius() { verifyIndex();
return getData()->boundingRadius[calculateIndex()]; }
637 AGX_FORCE_INLINE agx::Real const& GeometryPtr::boundingRadius()
const { verifyIndex();
return getData()->boundingRadius[calculateIndex()]; }
639 AGX_FORCE_INLINE agx::Vec3& GeometryPtr::localBoundCenter() { verifyIndex();
return getData()->localBoundCenter[calculateIndex()]; }
640 AGX_FORCE_INLINE agx::Vec3 const& GeometryPtr::localBoundCenter()
const { verifyIndex();
return getData()->localBoundCenter[calculateIndex()]; }
646 AGX_FORCE_INLINE agx::UInt32 const& GeometryPtr::cellIndex()
const { verifyIndex();
return getData()->cellIndex[calculateIndex()]; }
654 AGX_FORCE_INLINE agx::UInt& GeometryPtr::orientedBoundId() { verifyIndex();
return getData()->orientedBoundId[calculateIndex()]; }
655 AGX_FORCE_INLINE agx::UInt const& GeometryPtr::orientedBoundId()
const { verifyIndex();
return getData()->orientedBoundId[calculateIndex()]; }
660 AGX_FORCE_INLINE agx::UInt32& GeometryPtr::sweepAndPruneIndex() { verifyIndex();
return getData()->sweepAndPruneIndex[calculateIndex()]; }
661 AGX_FORCE_INLINE agx::UInt32 const& GeometryPtr::sweepAndPruneIndex()
const { verifyIndex();
return getData()->sweepAndPruneIndex[calculateIndex()]; }
666 AGX_FORCE_INLINE agx::Vec3f& GeometryPtr::surfaceVelocity() { verifyIndex();
return getData()->surfaceVelocity[calculateIndex()]; }
667 AGX_FORCE_INLINE agx::Vec3f const& GeometryPtr::surfaceVelocity()
const { verifyIndex();
return getData()->surfaceVelocity[calculateIndex()]; }
685 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
692 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
703 AGX_FORCE_INLINE agxCollide::GeometryState& GeometryInstance::state() { verifyIndex();
return getData()->state[getIndex()]; }
704 AGX_FORCE_INLINE agxCollide::GeometryState
const& GeometryInstance::state()
const { verifyIndex();
return getData()->state[getIndex()]; }
718 AGX_FORCE_INLINE agx::Real& GeometryInstance::boundingRadius() { verifyIndex();
return getData()->boundingRadius[getIndex()]; }
719 AGX_FORCE_INLINE agx::Real const& GeometryInstance::boundingRadius()
const { verifyIndex();
return getData()->boundingRadius[getIndex()]; }
721 AGX_FORCE_INLINE agx::Vec3& GeometryInstance::localBoundCenter() { verifyIndex();
return getData()->localBoundCenter[getIndex()]; }
722 AGX_FORCE_INLINE agx::Vec3 const& GeometryInstance::localBoundCenter()
const { verifyIndex();
return getData()->localBoundCenter[getIndex()]; }
728 AGX_FORCE_INLINE agx::UInt32 const& GeometryInstance::cellIndex()
const { verifyIndex();
return getData()->cellIndex[getIndex()]; }
736 AGX_FORCE_INLINE agx::UInt& GeometryInstance::orientedBoundId() { verifyIndex();
return getData()->orientedBoundId[getIndex()]; }
737 AGX_FORCE_INLINE agx::UInt const& GeometryInstance::orientedBoundId()
const { verifyIndex();
return getData()->orientedBoundId[getIndex()]; }
742 AGX_FORCE_INLINE agx::UInt32& GeometryInstance::sweepAndPruneIndex() { verifyIndex();
return getData()->sweepAndPruneIndex[getIndex()]; }
743 AGX_FORCE_INLINE agx::UInt32 const& GeometryInstance::sweepAndPruneIndex()
const { verifyIndex();
return getData()->sweepAndPruneIndex[getIndex()]; }
748 AGX_FORCE_INLINE agx::Vec3f& GeometryInstance::surfaceVelocity() { verifyIndex();
return getData()->surfaceVelocity[getIndex()]; }
749 AGX_FORCE_INLINE agx::Vec3f const& GeometryInstance::surfaceVelocity()
const { verifyIndex();
return getData()->surfaceVelocity[getIndex()]; }
771 # pragma warning(pop)
774 #undef AGX_ENTITY_WRAPPER
775 #undef AGX_ENTITY_NAMESPACE
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGX_TYPE_BINDING(_Type, _Name)
#define AGXPHYSICS_EXPORT
Axis aligned bounding box implementation.
The geometry representation used by the collision detection engine.
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()
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
agxData::EntityInstance instance()
EntityPtr & operator=(const EntityPtr &other)=default
Data storage for a collection of entity instances of a specified EntityModel.
agx::String fullPath() const
Representation of a name string.
Pointer to a entity instance of type Physics.CollisionGroupSet.
Abstract description of the data attributes for the Physics.Geometry entity.
static agxData::ScalarAttributeT< agx::UInt32 > * oldCellAttribute
virtual void configure(agx::TiXmlElement *eEntity) override
static agxData::ScalarAttributeT< agxCollide::GeometryState > * stateAttribute
virtual void construct(agxData::EntityPtr instance) override
static agxData::ScalarAttributeT< agx::UInt > * orientedBoundIdAttribute
static agxData::ScalarAttributeT< agx::Physics::Geometry::ShapePtr > * shapeAttribute
static agxData::EntityStorage * defaultStorage()
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
static agxData::ScalarAttributeT< agx::Physics::MaterialPtr > * materialAttribute
static agxData::ScalarAttributeT< agx::Physics::GeometryPtr > * nextAttribute
static agxData::ScalarAttributeT< agx::AffineMatrix4x4 > * transformAttribute
static agxData::ScalarAttributeT< agx::Physics::RigidBodyPtr > * bodyAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * sweepAndPruneIndexAttribute
static GeometryPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static GeometryModel * instance()
static agxData::ScalarAttributeT< agx::Real > * boundingRadiusAttribute
static agxData::ScalarAttributeT< agxCollide::BoundingAABB > * boundingAABBAttribute
GeometryModel(const agx::String &name="Geometry")
static agxData::ScalarAttributeT< agx::Physics::CollisionGroupSetPtr > * collisionGroupSetAttribute
virtual void initAttributeAccessors() override
static agxData::ScalarAttributeT< agx::Vec3f > * surfaceVelocityAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * cellIndexAttribute
static agxData::ScalarAttributeT< agx::Name > * nameAttribute
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::PointerAttributeT< agxCollide::Geometry * > * modelAttribute
static agxData::ScalarAttributeT< agx::UInt8 > * tierAttribute
void construct(agx::Physics::GeometryPtr geometry)
static agxData::ScalarAttributeT< agx::UInt16 > * cellSlotAttribute
static agxData::ScalarAttributeT< agx::Vec3 > * localBoundCenterAttribute
static agxData::ScalarAttributeT< agx::AffineMatrix4x4 > * localTransformAttribute
Pointer to a entity instance of type Physics.Geometry.
AGXPHYSICS_EXPORT agx::Real const & boundingRadius() const
AGXPHYSICS_EXPORT agx::AffineMatrix4x4 const & localTransform() const
AGXPHYSICS_EXPORT agx::UInt16 const & cellSlot() const
AGXPHYSICS_EXPORT agx::Name const & name() const
AGXPHYSICS_EXPORT agx::Vec3 & localBoundCenter()
AGXPHYSICS_EXPORT agxCollide::GeometryState const & state() const
AGXPHYSICS_EXPORT agxCollide::Geometry *& model()
AGXPHYSICS_EXPORT GeometrySemantics * operator->()
AGXPHYSICS_EXPORT agx::UInt32 & cellIndex()
AGXPHYSICS_EXPORT agx::Vec3 const & localBoundCenter() const
AGXPHYSICS_EXPORT agx::UInt32 & sweepAndPruneIndex()
const GeometryData * getData() const
AGXPHYSICS_EXPORT agx::UInt32 const & cellIndex() const
AGXPHYSICS_EXPORT agx::AffineMatrix4x4 & localTransform()
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr & next()
AGXPHYSICS_EXPORT agx::Vec3f const & surfaceVelocity() const
AGXPHYSICS_EXPORT agx::UInt16 & cellSlot()
AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtr & shape()
AGXPHYSICS_EXPORT agx::Physics::RigidBodyPtr const & body() const
AGXPHYSICS_EXPORT agxCollide::GeometryState & state()
AGXPHYSICS_EXPORT agx::UInt32 const & sweepAndPruneIndex() const
AGXPHYSICS_EXPORT agx::UInt32 & oldCell()
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr const & next() const
AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtr const & shape() const
AGXPHYSICS_EXPORT agx::Physics::CollisionGroupSetPtr const & collisionGroupSet() const
AGXPHYSICS_EXPORT agx::Physics::RigidBodyPtr & body()
AGXPHYSICS_EXPORT agx::Real & boundingRadius()
AGXPHYSICS_EXPORT agxCollide::BoundingAABB const & boundingAABB() const
AGXPHYSICS_EXPORT agx::Physics::MaterialPtr & material()
AGXPHYSICS_EXPORT agx::Physics::CollisionGroupSetPtr & collisionGroupSet()
AGXPHYSICS_EXPORT const GeometrySemantics * operator->() const
AGXPHYSICS_EXPORT agx::UInt & orientedBoundId()
AGXPHYSICS_EXPORT agx::AffineMatrix4x4 const & transform() const
AGXPHYSICS_EXPORT agxCollide::Geometry *const & model() const
AGXPHYSICS_EXPORT agx::UInt32 const & oldCell() const
AGXPHYSICS_EXPORT const GeometryInstance instance() const
AGXPHYSICS_EXPORT GeometryPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agx::AffineMatrix4x4 & transform()
AGXPHYSICS_EXPORT GeometryPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Vec3f & surfaceVelocity()
AGXPHYSICS_EXPORT agx::UInt8 const & tier() const
AGXPHYSICS_EXPORT agx::UInt const & orientedBoundId() const
AGXPHYSICS_EXPORT GeometryInstance instance()
AGXPHYSICS_EXPORT GeometryPtr(const agxData::EntityInstance &instance)
GeometryInstance InstanceType
AGXPHYSICS_EXPORT agx::UInt8 & tier()
AGXPHYSICS_EXPORT agx::Name & name()
AGXPHYSICS_EXPORT GeometryPtr()
AGXPHYSICS_EXPORT agx::Physics::MaterialPtr const & material() const
AGXPHYSICS_EXPORT agxCollide::BoundingAABB & boundingAABB()
Pointer to a entity instance of type Physics.Geometry.Shape.
Pointer to a entity instance of type Physics.Material.
Pointer to a entity instance of type Physics.RigidBody.
Abstract description of the data attributes for the Referenced entity.
Pointer to a entity instance of type Referenced.
Vector containing 'raw' data.
#define agxAssertN(expr, format,...)
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Contains classes for low level data storage for AGX.
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
agxData::EntityRef< GeometryPtr > GeometryRef
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())