21#ifndef GENERATED_AGX_PHYSICS_HIERARCHICALGRID_CELL2D_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_HIERARCHICALGRID_CELL2D_H_PLUGIN
24#define AGX_ENTITY_WRAPPER 1
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;
336 Cell2DInstance(Cell2DData* data,
agx::Index index);
341 Cell2DData* getData();
342 const Cell2DData* getData()
const;
434 inline Cell2DInstance
agx::Physics::HierarchicalGrid::Cell2DData::operator[] (
size_t index) {
return Cell2DInstance(
this, (
agx::Index)index); }
441 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
448 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
456 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
457 EntityPtr::getModel()->fullPath().c_str(), Cell2DModel::instance()->fullPath().c_str());
465 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
466 EntityPtr::getModel()->fullPath().c_str(), Cell2DModel::instance()->fullPath().c_str());
472 AGX_FORCE_INLINE Cell2DSemantics* Cell2DPtr::operator->() {
return (Cell2DSemantics* )
this; }
473 AGX_FORCE_INLINE const Cell2DSemantics* Cell2DPtr::operator->()
const {
return (
const Cell2DSemantics* )
this; }
484 AGX_FORCE_INLINE agx::Vec2f const& Cell2DPtr::position()
const { verifyIndex();
return getData()->position[calculateIndex()]; }
499 AGX_FORCE_INLINE agx::UInt8 const& Cell2DPtr::zoneType()
const { verifyIndex();
return getData()->zoneType[calculateIndex()]; }
510 AGX_FORCE_INLINE agx::UInt8 const& Cell2DPtr::numChildren()
const { verifyIndex();
return getData()->numChildren[calculateIndex()]; }
518 AGX_FORCE_INLINE agx::UInt32 const& Cell2DPtr::searchCost()
const { verifyIndex();
return getData()->searchCost[calculateIndex()]; }
533 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
540 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
555 AGX_FORCE_INLINE agx::Vec2f const& Cell2DInstance::position()
const { verifyIndex();
return getData()->position[getIndex()]; }
570 AGX_FORCE_INLINE agx::UInt8 const& Cell2DInstance::zoneType()
const { verifyIndex();
return getData()->zoneType[getIndex()]; }
581 AGX_FORCE_INLINE agx::UInt8 const& Cell2DInstance::numChildren()
const { verifyIndex();
return getData()->numChildren[getIndex()]; }
589 AGX_FORCE_INLINE agx::UInt32 const& Cell2DInstance::searchCost()
const { verifyIndex();
return getData()->searchCost[getIndex()]; }
595 AGX_FORCE_INLINE agx::Real const& Cell2DInstance::sizeAlignment()
const { verifyIndex();
return getData()->sizeAlignment; }
606AGX_TYPE_BINDING(
agx::Physics::HierarchicalGrid::Cell2DInstance, "Physics.HierarchicalGrid.Cell2DInstance")
612#undef AGX_ENTITY_WRAPPER
613#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...
EntityPtr & operator=(const EntityPtr &other)=default
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
agxData::EntityInstance instance()
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
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::SharedAttributeT< agx::Real32 > * emptyThresholdAttribute
static agxData::ScalarAttributeT< agx::Real32 > * emptyTimeAttribute
static agxData::ScalarAttributeT< agx::UInt64 > * linearIdAttribute
static agxData::ScalarAttributeT< agx::Vec2f > * positionAttribute
static agxData::SharedAttributeT< agx::Real > * sizeAlignmentAttribute
static agxData::EntityStorage * defaultStorage()
static Cell2DModel * instance()
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")
virtual void initAttributeAccessors() override
static agxData::ScalarAttributeT< agx::IndexRange32 > * collisionObjectsAttribute
Pointer to a entity instance of type Physics.HierarchicalGrid.Cell2D.
AGXPHYSICS_EXPORT agx::UInt8 & numChildren()
AGXPHYSICS_EXPORT agx::UInt8 const & state() const
AGXPHYSICS_EXPORT Cell2DPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agx::UInt32 const & children(size_t index) const
AGXPHYSICS_EXPORT Cell2DSemantics * operator->()
AGXPHYSICS_EXPORT agx::UInt8 & tier()
AGXPHYSICS_EXPORT Cell2DPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const neighbors() const
AGXPHYSICS_EXPORT Cell2DInstance instance()
AGXPHYSICS_EXPORT agx::UInt8 const & tier() const
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > children()
AGXPHYSICS_EXPORT agx::UInt32 const & parent() const
AGXPHYSICS_EXPORT agx::Vec2f const & position() const
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const children() const
AGXPHYSICS_EXPORT agx::Vec2f & position()
AGXPHYSICS_EXPORT agx::UInt32 & parent()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > neighbors()
const Cell2DData * getData() const
AGXPHYSICS_EXPORT Cell2DPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::UInt64 & linearId()
AGXPHYSICS_EXPORT agx::Real const & sizeAlignment() const
AGXPHYSICS_EXPORT agx::Vec2i const & id() const
AGXPHYSICS_EXPORT agx::UInt8 const & zoneType() const
AGXPHYSICS_EXPORT const Cell2DSemantics * operator->() const
AGXPHYSICS_EXPORT const Cell2DInstance instance() const
AGXPHYSICS_EXPORT agx::Real32 const & emptyTime() const
AGXPHYSICS_EXPORT agx::UInt32 & children(size_t index)
AGXPHYSICS_EXPORT agx::UInt32 const & searchCost() const
AGXPHYSICS_EXPORT agx::Real32 & emptyTime()
AGXPHYSICS_EXPORT agx::IndexRange32 & collisionObjects()
AGXPHYSICS_EXPORT agx::UInt32 & searchCost()
AGXPHYSICS_EXPORT agx::Real32 & emptyThreshold()
AGXPHYSICS_EXPORT agx::UInt64 const & linearId() const
Cell2DInstance InstanceType
AGXPHYSICS_EXPORT agx::Real & sizeAlignment()
AGXPHYSICS_EXPORT Cell2DPtr()
AGXPHYSICS_EXPORT agx::Real32 const & emptyThreshold() const
AGXPHYSICS_EXPORT agx::IndexRange32 const & collisionObjects() const
AGXPHYSICS_EXPORT agx::Vec2i & id()
AGXPHYSICS_EXPORT agx::UInt32 const & neighbors(size_t index) const
AGXPHYSICS_EXPORT agx::UInt8 & zoneType()
AGXPHYSICS_EXPORT agx::UInt32 & neighbors(size_t index)
AGXPHYSICS_EXPORT agx::UInt8 const & numChildren() const
AGXPHYSICS_EXPORT agx::UInt8 & state()
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.