21#ifndef GENERATED_AGX_PHYSICS_GEOMETRY_HEIGHTFIELD_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_GEOMETRY_HEIGHTFIELD_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 )
59 class HeightFieldModel;
60 class HeightFieldData;
62 class HeightFieldInstance;
63 class HeightFieldSemantics;
101 virtual void configure(agx::TiXmlElement* eEntity)
override;
109 #ifndef AGX_PHYSICS_GEOMETRY_HEIGHTFIELD_DATA_SET_OVERRIDE
110 #define AGX_PHYSICS_GEOMETRY_HEIGHTFIELD_DATA_SET
111 class AGXPHYSICS_EXPORT HeightFieldData :
public agx::Physics::Geometry::MeshData
114 HeightFieldInstance operator[] (
size_t index);
134 virtual ~HeightFieldData() {}
135 virtual void setNumElements(
agx::Index numElements)
override;
138 HeightFieldData& operator= (
const HeightFieldData&) {
return *
this; }
166 friend class HeightFieldPtr;
167 friend class HeightFieldInstance;
168 HeightFieldSemantics();
230 HeightFieldInstance();
231 HeightFieldInstance(HeightFieldData* data,
agx::Index index);
236 HeightFieldData* getData();
237 const HeightFieldData* getData()
const;
274 inline HeightFieldInstance
agx::Physics::Geometry::HeightFieldData::operator[] (
size_t index) {
return HeightFieldInstance(
this, (
agx::Index)index); }
281 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
288 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
296 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
297 EntityPtr::getModel()->fullPath().c_str(), HeightFieldModel::instance()->fullPath().c_str());
305 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
306 EntityPtr::getModel()->fullPath().c_str(), HeightFieldModel::instance()->fullPath().c_str());
312 AGX_FORCE_INLINE HeightFieldSemantics* HeightFieldPtr::operator->() {
return (HeightFieldSemantics* )
this; }
313 AGX_FORCE_INLINE const HeightFieldSemantics* HeightFieldPtr::operator->()
const {
return (
const HeightFieldSemantics* )
this; }
318 AGX_FORCE_INLINE agx::Real const& HeightFieldPtr::sizeX()
const { verifyIndex();
return getData()->sizeX[calculateIndex()]; }
321 AGX_FORCE_INLINE agx::Real const& HeightFieldPtr::sizeY()
const { verifyIndex();
return getData()->sizeY[calculateIndex()]; }
324 AGX_FORCE_INLINE agx::UInt64 const& HeightFieldPtr::resolutionX()
const { verifyIndex();
return getData()->resolutionX[calculateIndex()]; }
327 AGX_FORCE_INLINE agx::UInt64 const& HeightFieldPtr::resolutionY()
const { verifyIndex();
return getData()->resolutionY[calculateIndex()]; }
331 AGX_FORCE_INLINE HeightFieldInstance::HeightFieldInstance(HeightFieldData* data,
agx::Index index) :
agx::Physics::Geometry::MeshInstance(data, index) {}
336 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
343 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
352 AGX_FORCE_INLINE agx::Real const& HeightFieldInstance::sizeX()
const { verifyIndex();
return getData()->sizeX[getIndex()]; }
355 AGX_FORCE_INLINE agx::Real const& HeightFieldInstance::sizeY()
const { verifyIndex();
return getData()->sizeY[getIndex()]; }
358 AGX_FORCE_INLINE agx::UInt64 const& HeightFieldInstance::resolutionX()
const { verifyIndex();
return getData()->resolutionX[getIndex()]; }
361 AGX_FORCE_INLINE agx::UInt64 const& HeightFieldInstance::resolutionY()
const { verifyIndex();
return getData()->resolutionY[getIndex()]; }
372AGX_TYPE_BINDING(
agx::Physics::Geometry::HeightFieldInstance, "Physics.Geometry.HeightFieldInstance")
378#undef AGX_ENTITY_WRAPPER
379#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()
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()
An entity reference is a safe/referencing handle to an entity instance whose model is descendant from...
Data storage for a collection of entity instances of a specified EntityModel.
agx::String fullPath() const
Abstract description of the data attributes for the Physics.Geometry.HeightField entity.
static HeightFieldModel * instance()
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
static agxData::EntityStorage * defaultStorage()
void construct(agx::Physics::Geometry::HeightFieldPtr heightField)
static agxData::ScalarAttributeT< agx::UInt64 > * resolutionXAttribute
static HeightFieldPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
virtual void initAttributeAccessors() override
static agxData::ScalarAttributeT< agx::Real > * sizeYAttribute
HeightFieldModel(const agx::String &name="HeightField")
static agxData::ScalarAttributeT< agx::Real > * sizeXAttribute
virtual void configure(agx::TiXmlElement *eEntity) override
static agxData::ScalarAttributeT< agx::UInt64 > * resolutionYAttribute
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
virtual ~HeightFieldModel()
virtual void construct(agxData::EntityPtr instance) override
Pointer to a entity instance of type Physics.Geometry.HeightField.
HeightFieldModel ModelType
AGXPHYSICS_EXPORT agx::UInt64 & resolutionY()
AGXPHYSICS_EXPORT HeightFieldPtr()
AGXPHYSICS_EXPORT agx::UInt64 const & resolutionY() const
AGXPHYSICS_EXPORT agx::UInt64 & resolutionX()
AGXPHYSICS_EXPORT agx::UInt64 const & resolutionX() const
const HeightFieldData * getData() const
AGXPHYSICS_EXPORT agx::Real & sizeX()
AGXPHYSICS_EXPORT HeightFieldInstance instance()
AGXPHYSICS_EXPORT const HeightFieldInstance instance() const
AGXPHYSICS_EXPORT HeightFieldPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT const HeightFieldSemantics * operator->() const
AGXPHYSICS_EXPORT agx::Real & sizeY()
AGXPHYSICS_EXPORT HeightFieldPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT HeightFieldSemantics * operator->()
AGXPHYSICS_EXPORT agx::Real const & sizeX() const
HeightFieldData * getData()
AGXPHYSICS_EXPORT HeightFieldPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Real const & sizeY() const
HeightFieldInstance InstanceType
Abstract description of the data attributes for the Physics.Geometry.Mesh entity.
Pointer to a entity instance of type Physics.Geometry.Mesh.
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.
agxData::EntityRef< HeightFieldPtr > HeightFieldRef
The agx namespace contains the dynamics/math part of the AGX Dynamics API.