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
85 static CellPtr createInstance();
91 virtual void shutdownCleanup()
override;
105 static const size_t childrenArraySize = 8;
108 static const size_t neighborsArraySize = 32;
121 virtual void configure(agx::TiXmlElement* eEntity)
override;
122 virtual void initAttributeAccessors()
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);
240 friend class CellInstance;
270 const CellData* getData()
const;
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\'",
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 AGXPHYSICS_EXPORT agx::AtomicValue *& solveBodyOffsets()
agxData::EntityData * getData()
AGXPHYSICS_EXPORT CellSemantics * operator->()
static agxData::ScalarAttributeT< agx::UInt32 > * childrenAttribute
AGXPHYSICS_EXPORT agx::UInt8 & state()
static agxData::ScalarAttributeT< agx::UInt8 > * stateAttribute
agxData::EntityInstance instance()
static agxData::ScalarAttributeT< agx::IndexRange32 > * collisionObjectsAttribute
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZonePtr & internalZone()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > children()
Data storage for a collection of entity instances of a specified EntityModel.
AGXPHYSICS_EXPORT agx::UInt32 & sortedIndex()
Abstract representation of a value.
#define agxAssertN(expr, format,...)
agxData::EntityData * getData()
agx::String fullPath() const
#define AGX_TYPE_BINDING(_Type, _Name)
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
static agxData::ScalarAttributeT< agx::Vec3i > * idAttribute
#define AGXPHYSICS_EXPORT
AGXPHYSICS_EXPORT agx::IndexRange32 & collisionObjects()
static agxData::ScalarAttributeT< agx::UInt32 > * neighborsAttribute
Entity instance provides access to a single instance in an EntityStorage.
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
AGXPHYSICS_EXPORT agx::Vec3i & id()
static agxData::PointerAttributeT< agx::AtomicValue * > * solveBodyOffsetsAttribute
AGXPHYSICS_EXPORT agx::UInt8 & tier()
AGXPHYSICS_EXPORT CellInstance instance()
#define AGX_DECLARE_POINTER_TYPES(type)
bool isInstanceOf(agxData::EntityModel *model) const
static agxData::SharedAttributeT< agx::Real > * sizeAlignmentAttribute
AGXPHYSICS_EXPORT CellPtr()
AGXPHYSICS_EXPORT agx::Real32 & emptyTime()
AGXPHYSICS_EXPORT agx::UInt8 & invDepth()
static agxData::ScalarAttributeT< agx::UInt32 > * sortedIndexAttribute
Type-specific Array used for fast access into the data held by a Buffer.
static agxData::ScalarAttributeT< agx::UInt8 > * invDepthAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * parentAttribute
static agxData::ScalarAttributeT< agx::UInt8 > * zoneTypeAttribute
static agxData::ScalarAttributeT< agx::Real32 > * emptyTimeAttribute
Vector containing 'raw' data.
EntityPtr & operator=(const EntityPtr &other)=default
Namespace agx contains the dynamics/math part of the AGX Dynamics API.
static CellModel * instance()
Abstract description of the data attributes for the Physics.HierarchicalGrid.Cell entity...
Contains classes for low level data storage for AGX.
static agxData::ScalarAttributeT< agx::Vec3 > * positionAttribute
AGXPHYSICS_EXPORT CellPtr & operator=(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::UInt8 & numChildren()
AGXPHYSICS_EXPORT agx::Vec3 & position()
static agxData::ScalarAttributeT< agx::UInt8 > * tierAttribute
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
CellInstance InstanceType
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > neighbors()
static agxData::SharedAttributeT< agx::Real > * reorderingFrequencyAttribute
A class holding 3 dimensional vectors and providing basic arithmetic.
AGXPHYSICS_EXPORT agx::UInt8 & zoneType()
bool isInstanceOf(agxData::EntityModel *model) const
static agxData::ScalarAttributeT< agx::Physics::HierarchicalGrid::ContactZonePtr > * internalZoneAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * searchCostAttribute
static agxData::SharedAttributeT< agx::Real32 > * emptyThresholdAttribute
AGXPHYSICS_EXPORT agx::UInt32 & searchCost()
Pointer to a entity instance of type Physics.HierarchicalGrid.Cell.
AGXPHYSICS_EXPORT agx::Real & sizeAlignment()
AGXPHYSICS_EXPORT agx::Real32 & emptyThreshold()
static agxData::ScalarAttributeT< agx::UInt8 > * numChildrenAttribute
AGXPHYSICS_EXPORT agx::Real & reorderingFrequency()
AGXPHYSICS_EXPORT agx::UInt32 & parent()
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()