21 #ifndef GENERATED_AGX_PHYSICS_GEOMETRY_TRIANGLE_H_PLUGIN 22 #define GENERATED_AGX_PHYSICS_GEOMETRY_TRIANGLE_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 ) 63 class TriangleInstance;
64 class TriangleSemantics;
89 virtual void shutdownCleanup()
override;
95 static const size_t verticesArraySize = 3;
97 static const size_t normalsArraySize = 3;
99 static const size_t colorsArraySize = 3;
101 static const size_t indicesArraySize = 3;
107 virtual void configure(agx::TiXmlElement* eEntity)
override;
108 virtual void initAttributeAccessors()
override;
115 #ifndef AGX_PHYSICS_GEOMETRY_TRIANGLE_DATA_SET_OVERRIDE 116 #define AGX_PHYSICS_GEOMETRY_TRIANGLE_DATA_SET 120 TriangleInstance operator[] (
size_t index);
125 static const size_t verticesArraySize = 3;
127 static const size_t normalsArraySize = 3;
129 static const size_t colorsArraySize = 3;
131 static const size_t indicesArraySize = 3;
146 virtual ~TriangleData() {}
147 virtual void setNumElements(
agx::Index numElements)
override;
150 TriangleData& operator= (
const TriangleData&) {
return *
this; }
163 agx::Real const& getCameraDistance()
const;
168 void setCameraDistance(
agx::Real const& value);
173 friend class TriangleInstance;
202 TriangleData* getData();
203 const TriangleData* getData()
const;
239 TriangleInstance(TriangleData* data,
agx::Index index);
244 TriangleData* getData();
245 const TriangleData* getData()
const;
251 agx::Vec3f const& vertices(
size_t index)
const;
256 agx::Vec3f const& normals(
size_t index)
const;
287 inline TriangleInstance
agx::Physics::Geometry::TriangleData::operator[] (
size_t index) {
return TriangleInstance(
this, (
agx::Index)index); }
294 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
301 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
309 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
318 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
360 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
367 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
395 AGX_FORCE_INLINE agx::Real& TriangleInstance::cameraDistance() { verifyIndex();
return getData()->cameraDistance[getIndex()]; }
396 AGX_FORCE_INLINE agx::Real const& TriangleInstance::cameraDistance()
const { verifyIndex();
return getData()->cameraDistance[getIndex()]; }
407 AGX_TYPE_BINDING(agx::Physics::Geometry::TriangleInstance,
"Physics.Geometry.TriangleInstance")
410 # pragma warning(pop) 413 #undef AGX_ENTITY_WRAPPER 414 #undef AGX_ENTITY_NAMESPACE agxData::EntityData * getData()
static agxData::ScalarAttributeT< agx::Vec3f > * verticesAttribute
agxData::EntityInstance instance()
Data storage for a collection of entity instances of a specified EntityModel.
static agxData::ScalarAttributeT< agx::Real > * cameraDistanceAttribute
#define agxAssertN(expr, format,...)
A class holding 4 dimensional vectors and providing basic arithmetic.
agxData::EntityData * getData()
agx::String fullPath() const
AGXPHYSICS_EXPORT TrianglePtr()
#define AGX_TYPE_BINDING(_Type, _Name)
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
#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...
AGXPHYSICS_EXPORT TriangleInstance instance()
#define AGX_DECLARE_POINTER_TYPES(type)
bool isInstanceOf(agxData::EntityModel *model) const
Abstract description of the data attributes for the Physics.Geometry.Triangle entity.
Type-specific Array used for fast access into the data held by a Buffer.
TriangleInstance InstanceType
static TriangleModel * instance()
Vector containing 'raw' data.
EntityPtr & operator=(const EntityPtr &other)=default
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AGXPHYSICS_EXPORT agx::Real & cameraDistance()
AGXPHYSICS_EXPORT agxData::Array< agx::Vec3f > normals()
AGXPHYSICS_EXPORT TriangleSemantics * operator->()
Contains classes for low level data storage for AGX.
Pointer to a entity instance of type Physics.Geometry.Triangle.
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
static agxData::ScalarAttributeT< agx::UInt32 > * indicesAttribute
AGXPHYSICS_EXPORT agxData::Array< agx::Vec3f > vertices()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > indices()
bool isInstanceOf(agxData::EntityModel *model) const
AGXPHYSICS_EXPORT TrianglePtr & operator=(const agxData::EntityPtr &ptr)
static agxData::ScalarAttributeT< agx::Vec4f > * colorsAttribute
AGXPHYSICS_EXPORT agxData::Array< agx::Vec4f > colors()
static agxData::ScalarAttributeT< agx::Vec3f > * normalsAttribute
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()