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);
172 friend class TrianglePtr;
173 friend class TriangleInstance;
202 TriangleData* getData();
203 const TriangleData* getData()
const;
233 #ifdef AGX_GENERATED_TOLUA_WRAPPER
234 inline agx::Real const& getCameraDistance()
const {
return (*this)->getCameraDistance(); }
237 inline void setCameraDistance(
agx::Real const& value) { (*this)->setCameraDistance(value); }
249 TriangleInstance(TriangleData* data,
agx::Index index);
254 TriangleData* getData();
255 const TriangleData* getData()
const;
261 agx::Vec3f const& vertices(
size_t index)
const;
266 agx::Vec3f const& normals(
size_t index)
const;
297 inline TriangleInstance agx::Physics::Geometry::TriangleData::operator[] (
size_t index) {
return TriangleInstance(
this, (
agx::Index)index); }
304 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
311 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
319 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
328 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
335 AGX_FORCE_INLINE TriangleSemantics* TrianglePtr::operator->() {
return (TriangleSemantics* )
this; }
336 AGX_FORCE_INLINE const TriangleSemantics* TrianglePtr::operator->()
const {
return (
const TriangleSemantics* )
this; }
360 AGX_FORCE_INLINE agx::Real& TrianglePtr::cameraDistance() { verifyIndex();
return getData()->cameraDistance[calculateIndex()]; }
361 AGX_FORCE_INLINE agx::Real const& TrianglePtr::cameraDistance()
const { verifyIndex();
return getData()->cameraDistance[calculateIndex()]; }
365 AGX_FORCE_INLINE TriangleInstance::TriangleInstance(TriangleData* data,
agx::Index index) : agxData::EntityInstance(data, index) {}
370 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
377 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
405 AGX_FORCE_INLINE agx::Real& TriangleInstance::cameraDistance() { verifyIndex();
return getData()->cameraDistance[getIndex()]; }
406 AGX_FORCE_INLINE agx::Real const& TriangleInstance::cameraDistance()
const { verifyIndex();
return getData()->cameraDistance[getIndex()]; }
417 AGX_TYPE_BINDING(agx::Physics::Geometry::TriangleInstance, "Physics.Geometry.TriangleInstance")
420 # pragma warning(pop)
423 #undef AGX_ENTITY_WRAPPER
424 #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()
AGXPHYSICS_EXPORT TrianglePtr()
#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...
#define AGX_DECLARE_POINTER_TYPES(type)
agx::String fullPath() 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
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
bool isInstanceOf(agxData::EntityModel *model) const
static agxData::ScalarAttributeT< agx::Vec4f > * colorsAttribute
static agxData::ScalarAttributeT< agx::Vec3f > * normalsAttribute
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()