21 #ifndef GENERATED_AGX_PHYSICS_HIERARCHICALGRID_CELL2D_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_HIERARCHICALGRID_CELL2D_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 )
57 namespace HierarchicalGrid
64 class Cell2DSemantics;
104 static const size_t childrenArraySize = 4;
107 static const size_t neighborsArraySize = 12;
115 virtual void configure(agx::TiXmlElement* eEntity)
override;
123 #ifndef AGX_PHYSICS_HIERARCHICALGRID_CELL2D_DATA_SET_OVERRIDE
124 #define AGX_PHYSICS_HIERARCHICALGRID_CELL2D_DATA_SET
128 Cell2DInstance operator[] (
size_t index);
142 static const size_t childrenArraySize = 4;
145 static const size_t neighborsArraySize = 12;
172 virtual ~Cell2DData() {}
173 virtual void setNumElements(
agx::Index numElements)
override;
174 virtual void synchronizeSharedAttribute(
agxData::Value* value)
override;
177 Cell2DData& operator= (
const Cell2DData&) {
return *
this; }
219 friend class Cell2DPtr;
220 friend class Cell2DInstance;
330 #ifdef AGX_GENERATED_TOLUA_WRAPPER
331 inline agx::UInt8 const& getTier()
const {
return (*this)->getTier(); }
332 inline agx::Vec2i const& getId()
const {
return (*this)->getId(); }
333 inline agx::Vec2f const& getPosition()
const {
return (*this)->getPosition(); }
334 inline agx::UInt64 const& getLinearId()
const {
return (*this)->getLinearId(); }
335 inline agx::UInt8 const& getState()
const {
return (*this)->getState(); }
336 inline agx::Real32 const& getEmptyTime()
const {
return (*this)->getEmptyTime(); }
337 inline agx::IndexRange32 const& getCollisionObjects()
const {
return (*this)->getCollisionObjects(); }
338 inline agx::UInt8 const& getZoneType()
const {
return (*this)->getZoneType(); }
339 inline agx::UInt32 const& getParent()
const {
return (*this)->getParent(); }
340 inline agx::UInt8 const& getNumChildren()
const {
return (*this)->getNumChildren(); }
341 inline agx::UInt32 const& getSearchCost()
const {
return (*this)->getSearchCost(); }
344 inline void setTier(
agx::UInt8 const& value) { (*this)->setTier(value); }
345 inline void setId(
agx::Vec2i const& value) { (*this)->setId(value); }
346 inline void setPosition(
agx::Vec2f const& value) { (*this)->setPosition(value); }
347 inline void setLinearId(
agx::UInt64 const& value) { (*this)->setLinearId(value); }
348 inline void setState(
agx::UInt8 const& value) { (*this)->setState(value); }
349 inline void setEmptyTime(
agx::Real32 const& value) { (*this)->setEmptyTime(value); }
350 inline void setCollisionObjects(
agx::IndexRange32 const& value) { (*this)->setCollisionObjects(value); }
351 inline void setZoneType(
agx::UInt8 const& value) { (*this)->setZoneType(value); }
352 inline void setParent(
agx::UInt32 const& value) { (*this)->setParent(value); }
353 inline void setNumChildren(
agx::UInt8 const& value) { (*this)->setNumChildren(value); }
354 inline void setSearchCost(
agx::UInt32 const& value) { (*this)->setSearchCost(value); }
366 Cell2DInstance(Cell2DData* data,
agx::Index index);
371 Cell2DData* getData();
372 const Cell2DData* getData()
const;
464 inline Cell2DInstance
agx::Physics::HierarchicalGrid::Cell2DData::operator[] (
size_t index) {
return Cell2DInstance(
this, (
agx::Index)index); }
471 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
478 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
486 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
495 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
502 AGX_FORCE_INLINE Cell2DSemantics* Cell2DPtr::operator->() {
return (Cell2DSemantics* )
this; }
503 AGX_FORCE_INLINE const Cell2DSemantics* Cell2DPtr::operator->()
const {
return (
const Cell2DSemantics* )
this; }
514 AGX_FORCE_INLINE agx::Vec2f const& Cell2DPtr::position()
const { verifyIndex();
return getData()->position[calculateIndex()]; }
529 AGX_FORCE_INLINE agx::UInt8 const& Cell2DPtr::zoneType()
const { verifyIndex();
return getData()->zoneType[calculateIndex()]; }
540 AGX_FORCE_INLINE agx::UInt8 const& Cell2DPtr::numChildren()
const { verifyIndex();
return getData()->numChildren[calculateIndex()]; }
548 AGX_FORCE_INLINE agx::UInt32 const& Cell2DPtr::searchCost()
const { verifyIndex();
return getData()->searchCost[calculateIndex()]; }
563 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
570 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
585 AGX_FORCE_INLINE agx::Vec2f const& Cell2DInstance::position()
const { verifyIndex();
return getData()->position[getIndex()]; }
600 AGX_FORCE_INLINE agx::UInt8 const& Cell2DInstance::zoneType()
const { verifyIndex();
return getData()->zoneType[getIndex()]; }
611 AGX_FORCE_INLINE agx::UInt8 const& Cell2DInstance::numChildren()
const { verifyIndex();
return getData()->numChildren[getIndex()]; }
619 AGX_FORCE_INLINE agx::UInt32 const& Cell2DInstance::searchCost()
const { verifyIndex();
return getData()->searchCost[getIndex()]; }
625 AGX_FORCE_INLINE agx::Real const& Cell2DInstance::sizeAlignment()
const { verifyIndex();
return getData()->sizeAlignment; }
636 AGX_TYPE_BINDING(
agx::Physics::HierarchicalGrid::Cell2DInstance, "Physics.HierarchicalGrid.Cell2DInstance")
639 # pragma warning(pop)
642 #undef AGX_ENTITY_WRAPPER
643 #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()
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
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.
Abstract representation of a value.
agx::String fullPath() const
Abstract description of the data attributes for the Physics.HierarchicalGrid.Cell2D entity.
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
virtual void construct(agxData::EntityPtr instance) override
virtual void configure(agx::TiXmlElement *eEntity) override
static agxData::ScalarAttributeT< agx::UInt32 > * neighborsAttribute
static agxData::ScalarAttributeT< agx::UInt8 > * stateAttribute
static agxData::ScalarAttributeT< agx::UInt8 > * tierAttribute
static Cell2DPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static agxData::ScalarAttributeT< agx::UInt32 > * childrenAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * parentAttribute
static agxData::ScalarAttributeT< agx::Vec2i > * idAttribute
static agxData::ScalarAttributeT< agx::UInt8 > * numChildrenAttribute
static agxData::SharedAttributeT< agx::Real32 > * emptyThresholdAttribute
static agxData::ScalarAttributeT< agx::Real32 > * emptyTimeAttribute
static Cell2DModel * instance()
static agxData::ScalarAttributeT< agx::UInt64 > * linearIdAttribute
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::ScalarAttributeT< agx::Vec2f > * positionAttribute
static agxData::SharedAttributeT< agx::Real > * sizeAlignmentAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * searchCostAttribute
void construct(agx::Physics::HierarchicalGrid::Cell2DPtr cell2D)
static agxData::ScalarAttributeT< agx::UInt8 > * zoneTypeAttribute
Cell2DModel(const agx::String &name="Cell2D")
static agxData::EntityStorage * defaultStorage()
virtual void initAttributeAccessors() override
static agxData::ScalarAttributeT< agx::IndexRange32 > * collisionObjectsAttribute
Pointer to a entity instance of type Physics.HierarchicalGrid.Cell2D.
AGXPHYSICS_EXPORT agx::Real32 & emptyThreshold()
AGXPHYSICS_EXPORT Cell2DSemantics * operator->()
AGXPHYSICS_EXPORT agx::UInt8 const & state() const
AGXPHYSICS_EXPORT Cell2DPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agx::UInt8 const & numChildren() const
AGXPHYSICS_EXPORT agx::Vec2i & id()
AGXPHYSICS_EXPORT agx::Vec2f const & position() const
AGXPHYSICS_EXPORT agx::UInt8 & state()
AGXPHYSICS_EXPORT Cell2DPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT const Cell2DSemantics * operator->() const
AGXPHYSICS_EXPORT agx::Real32 const & emptyThreshold() const
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const neighbors() const
AGXPHYSICS_EXPORT Cell2DInstance instance()
const Cell2DData * getData() const
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > children()
AGXPHYSICS_EXPORT agx::Real32 const & emptyTime() const
AGXPHYSICS_EXPORT agx::UInt32 & children(size_t index)
AGXPHYSICS_EXPORT agx::Real & sizeAlignment()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const children() const
AGXPHYSICS_EXPORT agx::UInt32 & parent()
AGXPHYSICS_EXPORT agx::UInt32 & neighbors(size_t index)
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > neighbors()
AGXPHYSICS_EXPORT agx::UInt32 const & neighbors(size_t index) const
AGXPHYSICS_EXPORT Cell2DPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::UInt8 & tier()
AGXPHYSICS_EXPORT agx::Vec2f & position()
AGXPHYSICS_EXPORT agx::UInt8 const & zoneType() const
AGXPHYSICS_EXPORT agx::UInt32 & searchCost()
AGXPHYSICS_EXPORT agx::IndexRange32 & collisionObjects()
AGXPHYSICS_EXPORT const Cell2DInstance instance() const
AGXPHYSICS_EXPORT agx::UInt64 & linearId()
AGXPHYSICS_EXPORT agx::UInt8 const & tier() const
AGXPHYSICS_EXPORT agx::UInt64 const & linearId() const
AGXPHYSICS_EXPORT agx::UInt8 & numChildren()
AGXPHYSICS_EXPORT agx::Vec2i const & id() const
AGXPHYSICS_EXPORT agx::Real32 & emptyTime()
AGXPHYSICS_EXPORT agx::UInt32 const & children(size_t index) const
AGXPHYSICS_EXPORT agx::Real const & sizeAlignment() const
Cell2DInstance InstanceType
AGXPHYSICS_EXPORT agx::UInt32 const & searchCost() const
AGXPHYSICS_EXPORT Cell2DPtr()
AGXPHYSICS_EXPORT agx::UInt32 const & parent() const
AGXPHYSICS_EXPORT agx::UInt8 & zoneType()
AGXPHYSICS_EXPORT agx::IndexRange32 const & collisionObjects() const
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.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())