21 #ifndef GENERATED_AGX_PHYSICS_GEOMETRY_CAPSULE_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_GEOMETRY_CAPSULE_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 class CapsuleInstance;
62 class CapsuleSemantics;
98 virtual void configure(agx::TiXmlElement* eEntity)
override;
106 #ifndef AGX_PHYSICS_GEOMETRY_CAPSULE_DATA_SET_OVERRIDE
107 #define AGX_PHYSICS_GEOMETRY_CAPSULE_DATA_SET
111 CapsuleInstance operator[] (
size_t index);
127 virtual ~CapsuleData() {}
128 virtual void setNumElements(
agx::Index numElements)
override;
131 CapsuleData& operator= (
const CapsuleData&) {
return *
this; }
155 friend class CapsulePtr;
156 friend class CapsuleInstance;
201 #ifdef AGX_GENERATED_TOLUA_WRAPPER
202 inline agx::Real const& getHeight()
const {
return (*this)->getHeight(); }
203 inline agx::Real const& getRadius()
const {
return (*this)->getRadius(); }
206 inline void setHeight(
agx::Real const& value) { (*this)->setHeight(value); }
207 inline void setRadius(
agx::Real const& value) { (*this)->setRadius(value); }
222 CapsuleInstance(CapsuleData* data,
agx::Index index);
227 CapsuleData* getData();
228 const CapsuleData* getData()
const;
255 inline CapsuleInstance
agx::Physics::Geometry::CapsuleData::operator[] (
size_t index) {
return CapsuleInstance(
this, (
agx::Index)index); }
262 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
269 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
277 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
286 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
293 AGX_FORCE_INLINE CapsuleSemantics* CapsulePtr::operator->() {
return (CapsuleSemantics* )
this; }
294 AGX_FORCE_INLINE const CapsuleSemantics* CapsulePtr::operator->()
const {
return (
const CapsuleSemantics* )
this; }
299 AGX_FORCE_INLINE agx::Real const& CapsulePtr::height()
const { verifyIndex();
return getData()->height[calculateIndex()]; }
302 AGX_FORCE_INLINE agx::Real const& CapsulePtr::radius()
const { verifyIndex();
return getData()->radius[calculateIndex()]; }
306 AGX_FORCE_INLINE CapsuleInstance::CapsuleInstance(CapsuleData* data,
agx::Index index) :
agx::Physics::Geometry::ShapeInstance(data, index) {}
311 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
318 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
327 AGX_FORCE_INLINE agx::Real const& CapsuleInstance::height()
const { verifyIndex();
return getData()->height[getIndex()]; }
330 AGX_FORCE_INLINE agx::Real const& CapsuleInstance::radius()
const { verifyIndex();
return getData()->radius[getIndex()]; }
341 AGX_TYPE_BINDING(
agx::Physics::Geometry::CapsuleInstance, "Physics.Geometry.CapsuleInstance")
344 # pragma warning(pop)
347 #undef AGX_ENTITY_WRAPPER
348 #undef AGX_ENTITY_NAMESPACE
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGX_TYPE_BINDING(_Type, _Name)
#define AGXPHYSICS_EXPORT
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
An entity reference is a safe/referencing handle to an entity instance whose model is descendant from...
Data storage for a collection of entity instances of a specified EntityModel.
agx::String fullPath() const
Abstract description of the data attributes for the Physics.Geometry.Capsule entity.
virtual void construct(agxData::EntityPtr instance) override
static CapsuleModel * instance()
void construct(agx::Physics::Geometry::CapsulePtr capsule)
static agxData::ScalarAttributeT< agx::Real > * heightAttribute
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
virtual void configure(agx::TiXmlElement *eEntity) override
static agxData::EntityStorage * defaultStorage()
CapsuleModel(const agx::String &name="Capsule")
static CapsulePtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static agxData::ScalarAttributeT< agx::Real > * radiusAttribute
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
virtual void initAttributeAccessors() override
Pointer to a entity instance of type Physics.Geometry.Capsule.
CapsuleInstance InstanceType
AGXPHYSICS_EXPORT agx::Real & height()
AGXPHYSICS_EXPORT CapsulePtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::Real & radius()
AGXPHYSICS_EXPORT CapsulePtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT const CapsuleInstance instance() const
AGXPHYSICS_EXPORT CapsulePtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Real const & height() const
AGXPHYSICS_EXPORT CapsulePtr()
const CapsuleData * getData() const
AGXPHYSICS_EXPORT agx::Real const & radius() const
AGXPHYSICS_EXPORT const CapsuleSemantics * operator->() const
AGXPHYSICS_EXPORT CapsuleSemantics * operator->()
AGXPHYSICS_EXPORT CapsuleInstance instance()
Abstract description of the data attributes for the Physics.Geometry.Shape entity.
Pointer to a entity instance of type Physics.Geometry.Shape.
Vector containing 'raw' data.
#define agxAssertN(expr, format,...)
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
Contains classes for low level data storage for AGX.
agxData::EntityRef< CapsulePtr > CapsuleRef
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())