10 #ifndef MESHACCESSOR_H 11 #define MESHACCESSOR_H 15 #include <Rendering/Mesh/Mesh.h> 16 #include <Rendering/Mesh/MeshIndexData.h> 17 #include <Rendering/Mesh/VertexAttributeAccessors.h> 18 #include <Rendering/MeshUtils/ConnectivityAccessor.h> 19 #include <Rendering/MeshUtils/TriangleAccessor.h> 70 Util::Reference<Rendering::MeshUtils::ConnectivityAccessor>
78 Util::Reference<Rendering::MeshUtils::TriangleAccessor>
145 MinSG::GeometryNode* geoNodePtr
197 std::vector<uint32_t>
Util::Reference< Rendering::MeshUtils::ConnectivityAccessor > connectivityAccessorRef
A reference to the ConnectivityAccessor which enables access to the connectivity between vertices...
Definition: MeshAccessor.h:71
Rendering::MeshVertexData & meshVertexData
The VertexData which holds information about the vertices of the mesh.
Definition: MeshAccessor.h:50
Rendering::Mesh * meshPtr
A pointer to the managed mesh.
Definition: MeshAccessor.h:43
A struct that represents a single polygon.
Definition: Polygon.h:21
This file declares the AABB struct that models an axis aligned bounding box.
This class is used to simplify the accessing of meshes, their vertices and polygons.
Definition: MeshAccessor.h:29
AABB getAABB()
Return the aabb member variable.
Definition: MeshAccessor.cpp:143
Polygon * newPolygonPtr(const uint32_t &id)
For a given Id, create a new Polygon object for the corresponding polygon in the managed mesh...
Definition: MeshAccessor.cpp:34
bool operator==(const MeshAccessor &l, const MeshAccessor &r)
Overload operator==.
Definition: MeshAccessor.cpp:163
uint32_t getVertexCount()
Return the number of vertices in the managed mesh.
Definition: MeshAccessor.cpp:148
Geometry::Matrix4x4 worldTransformationMatrix
The matrix to convert local to world coordinates.
Definition: MeshAccessor.h:63
Util::Reference< Rendering::MeshUtils::TriangleAccessor > triAccessorRef
A reference to the triangle accessor which enables polygon access.
Definition: MeshAccessor.h:79
Polygon * getPolygonPtr(const uint32_t &id)
For a given Id, return the corresponding polygon in world coordinates.
Definition: MeshAccessor.cpp:113
MinSG::GeometryNode * getGeoNodePtr() const
Return the pointer stored in the member variable geoNodePtr.
Definition: MeshAccessor.cpp:158
AABB aabb
The AABB of the managed mesh.
Definition: MeshAccessor.h:85
MeshAccessor(MinSG::GeometryNode *geoNodePtr)
A constructor which initializes all member variables.
Definition: MeshAccessor.cpp:53
bool vertexIdValid(const uint32_t &id)
For a given Id, decide if this Id is a valid Id for accessing a vertex of this mesh.
Definition: MeshAccessor.cpp:29
bool triIdValid(const uint32_t &id)
For a given Id, decide if this Id is a valid Id for accessing a polygon of this mesh.
Definition: MeshAccessor.cpp:24
Rendering::MeshIndexData & meshIndexData
The IndexData which holds information about the indices of the vertices of the mesh.
Definition: MeshAccessor.h:57
void deletePolygons()
Delete all allocated polygon objects.
Definition: MeshAccessor.cpp:102
std::vector< uint32_t > getAdjacentVertexIds(const uint32_t &id)
Return a list containing all ids of vertices adjacent to the vertex id.
Definition: MeshAccessor.cpp:132
std::vector< Polygon * > polygons
A list of pointers to Polygon objects.
Definition: MeshAccessor.h:91
Geometry::Vec3 getVertex(const uint32_t &id)
Return the positon of the vertex corresponding to the given Id.
Definition: MeshAccessor.cpp:122
uint32_t getIndexCount()
Return the number of indices in the managed mesh.
Definition: MeshAccessor.cpp:153
This struct models an AABB.
Definition: AABB.h:22
MinSG::GeometryNode * geoNodePtr
A pointer to the GeometryNode which holds the mesh that is to be managed.
Definition: MeshAccessor.h:37