21#ifndef GENERATED_AGX_PHYSICS_HIERARCHICALGRID_CELL_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_HIERARCHICALGRID_CELL_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 )
53namespace agx {
namespace Physics {
namespace HierarchicalGrid {
class ContactZonePtr; }}}
59 namespace HierarchicalGrid
105 static const size_t childrenArraySize = 8;
108 static const size_t neighborsArraySize = 32;
121 virtual void configure(agx::TiXmlElement* eEntity)
override;
129 #ifndef AGX_PHYSICS_HIERARCHICALGRID_CELL_DATA_SET_OVERRIDE
130 #define AGX_PHYSICS_HIERARCHICALGRID_CELL_DATA_SET
134 CellInstance operator[] (
size_t index);
147 static const size_t childrenArraySize = 8;
150 static const size_t neighborsArraySize = 32;
178 typedef agx::Real reorderingFrequencyType;
186 virtual ~CellData() {}
187 virtual void setNumElements(
agx::Index numElements)
override;
188 virtual void synchronizeSharedAttribute(
agxData::Value* value)
override;
191 CellData& operator= (
const CellData&) {
return *
this; }
225 void setPosition(
agx::Vec3 const& value);
239 friend class CellPtr;
240 friend class CellInstance;
376 CellInstance(CellData* data,
agx::Index index);
382 const CellData* getData()
const;
473 agx::Real const& reorderingFrequency()
const;
494 inline CellInstance
agx::Physics::HierarchicalGrid::CellData::operator[] (
size_t index) {
return CellInstance(
this, (
agx::Index)index); }
501 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
508 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
516 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
517 EntityPtr::getModel()->fullPath().c_str(), CellModel::instance()->fullPath().c_str());
525 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
526 EntityPtr::getModel()->fullPath().c_str(), CellModel::instance()->fullPath().c_str());
532 AGX_FORCE_INLINE CellSemantics* CellPtr::operator->() {
return (CellSemantics* )
this; }
533 AGX_FORCE_INLINE const CellSemantics* CellPtr::operator->()
const {
return (
const CellSemantics* )
this; }
547 AGX_FORCE_INLINE agx::Vec3 const& CellPtr::position()
const { verifyIndex();
return getData()->position[calculateIndex()]; }
567 AGX_FORCE_INLINE agx::UInt8 const& CellPtr::numChildren()
const { verifyIndex();
return getData()->numChildren[calculateIndex()]; }
578 AGX_FORCE_INLINE agx::UInt32 const& CellPtr::sortedIndex()
const { verifyIndex();
return getData()->sortedIndex[calculateIndex()]; }
593 AGX_FORCE_INLINE agx::Real const& CellPtr::reorderingFrequency()
const { verifyIndex();
return getData()->reorderingFrequency; }
605 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
612 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
630 AGX_FORCE_INLINE agx::Vec3 const& CellInstance::position()
const { verifyIndex();
return getData()->position[getIndex()]; }
650 AGX_FORCE_INLINE agx::UInt8 const& CellInstance::numChildren()
const { verifyIndex();
return getData()->numChildren[getIndex()]; }
661 AGX_FORCE_INLINE agx::UInt32 const& CellInstance::sortedIndex()
const { verifyIndex();
return getData()->sortedIndex[getIndex()]; }
675 AGX_FORCE_INLINE agx::Real& CellInstance::reorderingFrequency() { verifyIndex();
return getData()->reorderingFrequency; }
676 AGX_FORCE_INLINE agx::Real const& CellInstance::reorderingFrequency()
const { verifyIndex();
return getData()->reorderingFrequency; }
679 AGX_FORCE_INLINE agx::Real const& CellInstance::sizeAlignment()
const { verifyIndex();
return getData()->sizeAlignment; }
690AGX_TYPE_BINDING(
agx::Physics::HierarchicalGrid::CellInstance, "Physics.HierarchicalGrid.CellInstance")
696#undef AGX_ENTITY_WRAPPER
697#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.Cell entity.
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
static agxData::ScalarAttributeT< agx::UInt32 > * searchCostAttribute
static agxData::ScalarAttributeT< agx::Physics::HierarchicalGrid::ContactZonePtr > * internalZoneAttribute
static agxData::ScalarAttributeT< agx::UInt8 > * stateAttribute
virtual void initAttributeAccessors() override
static agxData::ScalarAttributeT< agx::IndexRange32 > * collisionObjectsAttribute
static agxData::EntityStorage * defaultStorage()
virtual void configure(agx::TiXmlElement *eEntity) override
static CellPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static agxData::ScalarAttributeT< agx::Vec3 > * positionAttribute
static agxData::SharedAttributeT< agx::Real32 > * emptyThresholdAttribute
static agxData::ScalarAttributeT< agx::Vec3i > * idAttribute
static CellModel * instance()
static agxData::ScalarAttributeT< agx::UInt8 > * zoneTypeAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * sortedIndexAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * parentAttribute
static agxData::SharedAttributeT< agx::Real > * sizeAlignmentAttribute
CellModel(const agx::String &name="Cell")
void construct(agx::Physics::HierarchicalGrid::CellPtr cell)
static agxData::SharedAttributeT< agx::Real > * reorderingFrequencyAttribute
static agxData::ScalarAttributeT< agx::UInt8 > * numChildrenAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * childrenAttribute
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::ScalarAttributeT< agx::UInt8 > * invDepthAttribute
static agxData::ScalarAttributeT< agx::Real32 > * emptyTimeAttribute
static agxData::PointerAttributeT< agx::AtomicValue * > * solveBodyOffsetsAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * neighborsAttribute
static agxData::ScalarAttributeT< agx::UInt8 > * tierAttribute
virtual void construct(agxData::EntityPtr instance) override
Pointer to a entity instance of type Physics.HierarchicalGrid.Cell.
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const children() const
AGXPHYSICS_EXPORT agx::UInt32 & neighbors(size_t index)
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > neighbors()
AGXPHYSICS_EXPORT agx::UInt8 const & invDepth() const
AGXPHYSICS_EXPORT agx::UInt32 & sortedIndex()
AGXPHYSICS_EXPORT agx::UInt32 & children(size_t index)
AGXPHYSICS_EXPORT agx::UInt8 & numChildren()
AGXPHYSICS_EXPORT const CellSemantics * operator->() const
AGXPHYSICS_EXPORT agx::IndexRange32 const & collisionObjects() const
AGXPHYSICS_EXPORT agx::UInt8 & state()
AGXPHYSICS_EXPORT agx::Real & reorderingFrequency()
AGXPHYSICS_EXPORT agx::UInt8 const & numChildren() const
AGXPHYSICS_EXPORT agx::UInt8 const & tier() const
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > children()
AGXPHYSICS_EXPORT CellPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::Real const & reorderingFrequency() const
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZonePtr const & internalZone() const
AGXPHYSICS_EXPORT CellSemantics * operator->()
AGXPHYSICS_EXPORT agx::IndexRange32 & collisionObjects()
AGXPHYSICS_EXPORT agx::Real32 const & emptyThreshold() const
AGXPHYSICS_EXPORT agx::Real const & sizeAlignment() const
AGXPHYSICS_EXPORT agx::AtomicValue *& solveBodyOffsets()
AGXPHYSICS_EXPORT CellPtr()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const neighbors() const
AGXPHYSICS_EXPORT agx::UInt32 const & children(size_t index) const
AGXPHYSICS_EXPORT agx::UInt8 & invDepth()
AGXPHYSICS_EXPORT agx::UInt8 & tier()
const CellData * getData() const
CellInstance InstanceType
AGXPHYSICS_EXPORT agx::UInt32 const & neighbors(size_t index) const
AGXPHYSICS_EXPORT agx::Real32 & emptyThreshold()
AGXPHYSICS_EXPORT CellPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Vec3 const & position() const
AGXPHYSICS_EXPORT CellInstance instance()
AGXPHYSICS_EXPORT const CellInstance instance() const
AGXPHYSICS_EXPORT agx::Vec3 & position()
AGXPHYSICS_EXPORT agx::AtomicValue *const & solveBodyOffsets() const
AGXPHYSICS_EXPORT agx::Real32 const & emptyTime() const
AGXPHYSICS_EXPORT agx::UInt8 & zoneType()
AGXPHYSICS_EXPORT agx::UInt8 const & state() const
AGXPHYSICS_EXPORT agx::Real32 & emptyTime()
AGXPHYSICS_EXPORT agx::UInt32 const & sortedIndex() const
AGXPHYSICS_EXPORT agx::Vec3i const & id() const
AGXPHYSICS_EXPORT agx::Real & sizeAlignment()
AGXPHYSICS_EXPORT agx::UInt32 & searchCost()
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZonePtr & internalZone()
AGXPHYSICS_EXPORT agx::Vec3i & id()
AGXPHYSICS_EXPORT agx::UInt32 const & parent() const
AGXPHYSICS_EXPORT agx::UInt32 & parent()
AGXPHYSICS_EXPORT agx::UInt32 const & searchCost() const
AGXPHYSICS_EXPORT agx::UInt8 const & zoneType() const
AGXPHYSICS_EXPORT CellPtr(agxData::EntityStorage *storage, agx::Index id)
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.