21 #ifndef GENERATED_AGX_PHYSICS_HIERARCHICALGRID_GRIDTIER2D_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_HIERARCHICALGRID_GRIDTIER2D_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 )
55 namespace HierarchicalGrid
58 class GridTier2DModel;
61 class GridTier2DInstance;
62 class GridTier2DSemantics;
87 virtual void shutdownCleanup()
override;
100 virtual void configure(agx::TiXmlElement* eEntity)
override;
101 virtual void initAttributeAccessors()
override;
108 #ifndef AGX_PHYSICS_HIERARCHICALGRID_GRIDTIER2D_DATA_SET_OVERRIDE
109 #define AGX_PHYSICS_HIERARCHICALGRID_GRIDTIER2D_DATA_SET
113 GridTier2DInstance operator[] (
size_t index);
133 virtual ~GridTier2DData() {}
134 virtual void setNumElements(
agx::Index numElements)
override;
137 GridTier2DData& operator= (
const GridTier2DData&) {
return *
this; }
152 agx::Real const& getBoundingRadius()
const;
160 void setBoundingRadius(
agx::Real const& value);
165 friend class GridTier2DPtr;
166 friend class GridTier2DInstance;
167 GridTier2DSemantics();
195 GridTier2DData* getData();
196 const GridTier2DData* getData()
const;
221 #ifdef AGX_GENERATED_TOLUA_WRAPPER
222 inline agx::Real const& getSize()
const {
return (*this)->getSize(); }
223 inline agx::Real const& getInvSize()
const {
return (*this)->getInvSize(); }
224 inline agx::Real const& getBoundingRadius()
const {
return (*this)->getBoundingRadius(); }
228 inline void setSize(
agx::Real const& value) { (*this)->setSize(value); }
229 inline void setInvSize(
agx::Real const& value) { (*this)->setInvSize(value); }
230 inline void setBoundingRadius(
agx::Real const& value) { (*this)->setBoundingRadius(value); }
242 GridTier2DInstance();
243 GridTier2DInstance(GridTier2DData* data,
agx::Index index);
248 GridTier2DData* getData();
249 const GridTier2DData* getData()
const;
286 inline GridTier2DInstance agx::Physics::HierarchicalGrid::GridTier2DData::operator[] (
size_t index) {
return GridTier2DInstance(
this, (
agx::Index)index); }
293 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
300 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
308 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
317 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
324 AGX_FORCE_INLINE GridTier2DSemantics* GridTier2DPtr::operator->() {
return (GridTier2DSemantics* )
this; }
325 AGX_FORCE_INLINE const GridTier2DSemantics* GridTier2DPtr::operator->()
const {
return (
const GridTier2DSemantics* )
this; }
330 AGX_FORCE_INLINE agx::Real const& GridTier2DPtr::size()
const { verifyIndex();
return getData()->size[calculateIndex()]; }
333 AGX_FORCE_INLINE agx::Real const& GridTier2DPtr::invSize()
const { verifyIndex();
return getData()->invSize[calculateIndex()]; }
335 AGX_FORCE_INLINE agx::Real& GridTier2DPtr::boundingRadius() { verifyIndex();
return getData()->boundingRadius[calculateIndex()]; }
336 AGX_FORCE_INLINE agx::Real const& GridTier2DPtr::boundingRadius()
const { verifyIndex();
return getData()->boundingRadius[calculateIndex()]; }
343 AGX_FORCE_INLINE GridTier2DInstance::GridTier2DInstance(GridTier2DData* data,
agx::Index index) : agxData::EntityInstance(data, index) {}
348 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
355 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
364 AGX_FORCE_INLINE agx::Real const& GridTier2DInstance::size()
const { verifyIndex();
return getData()->size[getIndex()]; }
367 AGX_FORCE_INLINE agx::Real const& GridTier2DInstance::invSize()
const { verifyIndex();
return getData()->invSize[getIndex()]; }
369 AGX_FORCE_INLINE agx::Real& GridTier2DInstance::boundingRadius() { verifyIndex();
return getData()->boundingRadius[getIndex()]; }
370 AGX_FORCE_INLINE agx::Real const& GridTier2DInstance::boundingRadius()
const { verifyIndex();
return getData()->boundingRadius[getIndex()]; }
384 AGX_TYPE_BINDING(agx::Physics::HierarchicalGrid::GridTier2DInstance, "Physics.HierarchicalGrid.GridTier2DInstance")
387 # pragma warning(pop)
390 #undef AGX_ENTITY_WRAPPER
391 #undef AGX_ENTITY_NAMESPACE
agxData::EntityData * getData()
agxData::EntityInstance instance()
Data storage for a collection of entity instances of a specified EntityModel.
#define agxAssertN(expr, format,...)
agxData::EntityData * getData()
#define AGX_TYPE_BINDING(_Type, _Name)
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
bool isInstanceOf(agxData::EntityModel *model) const
#define AGXPHYSICS_EXPORT
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...
Pointer to a entity instance of type Physics.HierarchicalGrid.GridTier2D.
#define AGX_DECLARE_POINTER_TYPES(type)
agx::String fullPath() const
GridTier2DModel ModelType
Type-specific Array used for fast access into the data held by a Buffer.
static agxData::PointerAttributeT< agx::GridCell2DTable * > * cellTableAttribute
AGXPHYSICS_EXPORT GridTier2DPtr()
static agxData::ScalarAttributeT< agx::Real > * sizeAttribute
Vector containing 'raw' data.
EntityPtr & operator=(const EntityPtr &other)=default
static agxData::ScalarAttributeT< agx::Real > * invSizeAttribute
static GridTier2DModel * instance()
Abstract description of the data attributes for the Physics.HierarchicalGrid.GridTier2D entity...
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
bool isInstanceOf(agxData::EntityModel *model) const
GridTier2DInstance InstanceType
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
static agxData::ScalarAttributeT< agx::Real > * boundingRadiusAttribute