This class is used to simplify the accessing of meshes, their vertices and polygons.
More...
#include <MeshAccessor.h>
|
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. More...
|
|
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. More...
|
|
Polygon * | newPolygonPtr (const uint32_t &id) |
| For a given Id, create a new Polygon object for the corresponding polygon in the managed mesh. More...
|
|
This class is used to simplify the accessing of meshes, their vertices and polygons.
◆ MeshAccessor()
Pathfinder::MeshAccessor::MeshAccessor |
( |
MinSG::GeometryNode * |
geoNodePtr | ) |
|
A constructor which initializes all member variables.
- Parameters
-
geoNodePtr | A pointer to a GeometryNode. |
◆ deletePolygons()
void Pathfinder::MeshAccessor::deletePolygons |
( |
| ) |
|
Delete all allocated polygon objects.
◆ getAABB()
AABB Pathfinder::MeshAccessor::getAABB |
( |
| ) |
|
Return the aabb member variable.
- Returns
- Return the contents of aabb.
◆ getAdjacentVertexIds()
std::vector< uint32_t > Pathfinder::MeshAccessor::getAdjacentVertexIds |
( |
const uint32_t & |
id | ) |
|
Return a list containing all ids of vertices adjacent to the vertex id.
- Parameters
-
id | The id of the vertex whose neighbours shall be returned. |
- Returns
- Return a list of the ids of all adjacent vertices.
◆ getGeoNodePtr()
MinSG::GeometryNode * Pathfinder::MeshAccessor::getGeoNodePtr |
( |
| ) |
const |
Return the pointer stored in the member variable geoNodePtr.
- Returns
- Return the contents of geoNodePtr.
◆ getIndexCount()
uint32_t Pathfinder::MeshAccessor::getIndexCount |
( |
| ) |
|
Return the number of indices in the managed mesh.
- Returns
- Return the number of indices in the mesh.
◆ getPolygonPtr()
Polygon * Pathfinder::MeshAccessor::getPolygonPtr |
( |
const uint32_t & |
id | ) |
|
For a given Id, return the corresponding polygon in world coordinates.
- Parameters
-
- Returns
- Return a pointer to a polygon object that represents the queried polygon of the mesh.
◆ getVertex()
Geometry::Vec3 Pathfinder::MeshAccessor::getVertex |
( |
const uint32_t & |
id | ) |
|
Return the positon of the vertex corresponding to the given Id.
The position is given in world coordinates.
- Parameters
-
id | The index of the vertex. |
- Returns
- Return the postion of the vertex with the Id id in world coordinates.
◆ getVertexCount()
uint32_t Pathfinder::MeshAccessor::getVertexCount |
( |
| ) |
|
Return the number of vertices in the managed mesh.
- Returns
- return the number of vertices in the mesh.
◆ newPolygonPtr()
Polygon * Pathfinder::MeshAccessor::newPolygonPtr |
( |
const uint32_t & |
id | ) |
|
|
private |
For a given Id, create a new Polygon object for the corresponding polygon in the managed mesh.
- Parameters
-
id | The polygon's Id in the managed mesh. |
- Returns
- Return a pointer to a polygon object that represents the queried polygon of the mesh.
◆ triIdValid()
bool Pathfinder::MeshAccessor::triIdValid |
( |
const uint32_t & |
id | ) |
|
|
private |
For a given Id, decide if this Id is a valid Id for accessing a polygon of this mesh.
- Parameters
-
id | The Id which is to be checked. |
- Returns
- Return true if id is valid. Return false otherwise.
◆ vertexIdValid()
bool Pathfinder::MeshAccessor::vertexIdValid |
( |
const uint32_t & |
id | ) |
|
|
private |
For a given Id, decide if this Id is a valid Id for accessing a vertex of this mesh.
- Parameters
-
id | The Id which is to be checked. |
- Returns
- Return true if it is valid. Return false otherwise.
◆ aabb
AABB Pathfinder::MeshAccessor::aabb |
|
private |
The AABB of the managed mesh.
◆ connectivityAccessorRef
Util::Reference<Rendering::MeshUtils::ConnectivityAccessor> Pathfinder::MeshAccessor::connectivityAccessorRef |
|
private |
A reference to the ConnectivityAccessor which enables access to the connectivity between vertices.
◆ geoNodePtr
MinSG::GeometryNode* Pathfinder::MeshAccessor::geoNodePtr |
|
private |
A pointer to the GeometryNode which holds the mesh that is to be managed.
◆ meshIndexData
Rendering::MeshIndexData& Pathfinder::MeshAccessor::meshIndexData |
|
private |
The IndexData which holds information about the indices of the vertices of the mesh.
◆ meshPtr
Rendering::Mesh* Pathfinder::MeshAccessor::meshPtr |
|
private |
A pointer to the managed mesh.
◆ meshVertexData
Rendering::MeshVertexData& Pathfinder::MeshAccessor::meshVertexData |
|
private |
The VertexData which holds information about the vertices of the mesh.
◆ polygons
std::vector<Polygon*> Pathfinder::MeshAccessor::polygons |
|
private |
A list of pointers to Polygon objects.
◆ triAccessorRef
Util::Reference<Rendering::MeshUtils::TriangleAccessor> Pathfinder::MeshAccessor::triAccessorRef |
|
private |
A reference to the triangle accessor which enables polygon access.
◆ worldTransformationMatrix
Geometry::Matrix4x4 Pathfinder::MeshAccessor::worldTransformationMatrix |
|
private |
The matrix to convert local to world coordinates.
The documentation for this class was generated from the following files: