21 #ifndef GENERATED_AGX_PHYSICS_HIERARCHICALGRID_CELL_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_HIERARCHICALGRID_CELL_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 )
53 namespace 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;
370 #ifdef AGX_GENERATED_TOLUA_WRAPPER
371 inline agx::UInt8 const& getTier()
const {
return (*this)->getTier(); }
372 inline agx::UInt8 const& getInvDepth()
const {
return (*this)->getInvDepth(); }
373 inline agx::Vec3i const& getId()
const {
return (*this)->getId(); }
374 inline agx::Vec3 const& getPosition()
const {
return (*this)->getPosition(); }
375 inline agx::UInt8 const& getState()
const {
return (*this)->getState(); }
376 inline agx::Real32 const& getEmptyTime()
const {
return (*this)->getEmptyTime(); }
377 inline agx::IndexRange32 const& getCollisionObjects()
const {
return (*this)->getCollisionObjects(); }
378 inline agx::UInt32 const& getParent()
const {
return (*this)->getParent(); }
379 inline agx::UInt8 const& getNumChildren()
const {
return (*this)->getNumChildren(); }
380 inline agx::UInt32 const& getSearchCost()
const {
return (*this)->getSearchCost(); }
381 inline agx::UInt32 const& getSortedIndex()
const {
return (*this)->getSortedIndex(); }
383 inline agx::UInt8 const& getZoneType()
const {
return (*this)->getZoneType(); }
384 inline agx::AtomicValue*
const& getSolveBodyOffsets()
const {
return (*this)->getSolveBodyOffsets(); }
387 inline void setTier(
agx::UInt8 const& value) { (*this)->setTier(value); }
388 inline void setInvDepth(
agx::UInt8 const& value) { (*this)->setInvDepth(value); }
389 inline void setId(
agx::Vec3i const& value) { (*this)->setId(value); }
390 inline void setPosition(
agx::Vec3 const& value) { (*this)->setPosition(value); }
391 inline void setState(
agx::UInt8 const& value) { (*this)->setState(value); }
392 inline void setEmptyTime(
agx::Real32 const& value) { (*this)->setEmptyTime(value); }
393 inline void setCollisionObjects(
agx::IndexRange32 const& value) { (*this)->setCollisionObjects(value); }
394 inline void setParent(
agx::UInt32 const& value) { (*this)->setParent(value); }
395 inline void setNumChildren(
agx::UInt8 const& value) { (*this)->setNumChildren(value); }
396 inline void setSearchCost(
agx::UInt32 const& value) { (*this)->setSearchCost(value); }
397 inline void setSortedIndex(
agx::UInt32 const& value) { (*this)->setSortedIndex(value); }
399 inline void setZoneType(
agx::UInt8 const& value) { (*this)->setZoneType(value); }
400 inline void setSolveBodyOffsets(
agx::AtomicValue*
const& value) { (*this)->setSolveBodyOffsets(value); }
412 CellInstance(CellData* data,
agx::Index index);
418 const CellData* getData()
const;
509 agx::Real const& reorderingFrequency()
const;
530 inline CellInstance
agx::Physics::HierarchicalGrid::CellData::operator[] (
size_t index) {
return CellInstance(
this, (
agx::Index)index); }
537 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
544 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
552 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
561 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
568 AGX_FORCE_INLINE CellSemantics* CellPtr::operator->() {
return (CellSemantics* )
this; }
569 AGX_FORCE_INLINE const CellSemantics* CellPtr::operator->()
const {
return (
const CellSemantics* )
this; }
583 AGX_FORCE_INLINE agx::Vec3 const& CellPtr::position()
const { verifyIndex();
return getData()->position[calculateIndex()]; }
603 AGX_FORCE_INLINE agx::UInt8 const& CellPtr::numChildren()
const { verifyIndex();
return getData()->numChildren[calculateIndex()]; }
614 AGX_FORCE_INLINE agx::UInt32 const& CellPtr::sortedIndex()
const { verifyIndex();
return getData()->sortedIndex[calculateIndex()]; }
629 AGX_FORCE_INLINE agx::Real const& CellPtr::reorderingFrequency()
const { verifyIndex();
return getData()->reorderingFrequency; }
641 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
648 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
666 AGX_FORCE_INLINE agx::Vec3 const& CellInstance::position()
const { verifyIndex();
return getData()->position[getIndex()]; }
686 AGX_FORCE_INLINE agx::UInt8 const& CellInstance::numChildren()
const { verifyIndex();
return getData()->numChildren[getIndex()]; }
697 AGX_FORCE_INLINE agx::UInt32 const& CellInstance::sortedIndex()
const { verifyIndex();
return getData()->sortedIndex[getIndex()]; }
711 AGX_FORCE_INLINE agx::Real& CellInstance::reorderingFrequency() { verifyIndex();
return getData()->reorderingFrequency; }
712 AGX_FORCE_INLINE agx::Real const& CellInstance::reorderingFrequency()
const { verifyIndex();
return getData()->reorderingFrequency; }
715 AGX_FORCE_INLINE agx::Real const& CellInstance::sizeAlignment()
const { verifyIndex();
return getData()->sizeAlignment; }
726 AGX_TYPE_BINDING(
agx::Physics::HierarchicalGrid::CellInstance, "Physics.HierarchicalGrid.CellInstance")
729 # pragma warning(pop)
732 #undef AGX_ENTITY_WRAPPER
733 #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.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
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 CellModel * instance()
static agxData::SharedAttributeT< agx::Real32 > * emptyThresholdAttribute
static agxData::ScalarAttributeT< agx::Vec3i > * idAttribute
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
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
static agxData::EntityStorage * defaultStorage()
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
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 agxData::Array< agx::UInt32 > neighbors()
AGXPHYSICS_EXPORT agx::Real & reorderingFrequency()
AGXPHYSICS_EXPORT agx::UInt8 const & invDepth() const
AGXPHYSICS_EXPORT agx::IndexRange32 & collisionObjects()
AGXPHYSICS_EXPORT agx::UInt32 const & parent() const
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > children()
AGXPHYSICS_EXPORT agx::UInt32 const & searchCost() const
AGXPHYSICS_EXPORT agx::Real const & sizeAlignment() const
AGXPHYSICS_EXPORT CellPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::AtomicValue *const & solveBodyOffsets() const
AGXPHYSICS_EXPORT agx::UInt32 & neighbors(size_t index)
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZonePtr const & internalZone() const
AGXPHYSICS_EXPORT CellPtr()
AGXPHYSICS_EXPORT agx::UInt8 & numChildren()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const neighbors() const
AGXPHYSICS_EXPORT agx::Real32 const & emptyThreshold() const
AGXPHYSICS_EXPORT agx::UInt32 const & sortedIndex() const
AGXPHYSICS_EXPORT agx::Real const & reorderingFrequency() const
AGXPHYSICS_EXPORT agx::AtomicValue *& solveBodyOffsets()
CellInstance InstanceType
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZonePtr & internalZone()
AGXPHYSICS_EXPORT CellPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::UInt32 & searchCost()
AGXPHYSICS_EXPORT agx::UInt8 & tier()
AGXPHYSICS_EXPORT CellInstance instance()
AGXPHYSICS_EXPORT agx::Vec3 & position()
AGXPHYSICS_EXPORT const CellInstance instance() const
AGXPHYSICS_EXPORT const CellSemantics * operator->() const
AGXPHYSICS_EXPORT agx::UInt32 & children(size_t index)
AGXPHYSICS_EXPORT agx::UInt8 & invDepth()
AGXPHYSICS_EXPORT agx::UInt32 const & children(size_t index) const
AGXPHYSICS_EXPORT agx::Real32 & emptyThreshold()
AGXPHYSICS_EXPORT agx::UInt8 & zoneType()
AGXPHYSICS_EXPORT agx::UInt32 & sortedIndex()
const CellData * getData() const
AGXPHYSICS_EXPORT agx::UInt8 const & tier() const
AGXPHYSICS_EXPORT agx::Real & sizeAlignment()
AGXPHYSICS_EXPORT agx::Vec3i & id()
AGXPHYSICS_EXPORT CellSemantics * operator->()
AGXPHYSICS_EXPORT agx::UInt8 & state()
AGXPHYSICS_EXPORT agx::Vec3i const & id() const
AGXPHYSICS_EXPORT agx::IndexRange32 const & collisionObjects() const
AGXPHYSICS_EXPORT agx::UInt32 & parent()
AGXPHYSICS_EXPORT agx::UInt8 const & state() const
AGXPHYSICS_EXPORT agx::Real32 const & emptyTime() const
AGXPHYSICS_EXPORT agx::UInt8 const & numChildren() const
AGXPHYSICS_EXPORT agx::Vec3 const & position() const
AGXPHYSICS_EXPORT agx::UInt8 const & zoneType() const
AGXPHYSICS_EXPORT agx::Real32 & emptyTime()
AGXPHYSICS_EXPORT agx::UInt32 const & neighbors(size_t index) 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.
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())