Emergency 2017 Dokumentation  v3.0.1
qsf::AnalysedMesh Class Reference

Mesh analysing manager class. More...

#include <AnalysedMesh.h>

Classes

class  BaseMeshData
 
struct  BaseMeshLine
 
class  BaseMeshSub
 
struct  BaseMeshTriangle
 
struct  BaseMeshVertex
 

Public Member Functions

 AnalysedMesh ()
 Default constructor. More...
 
 ~AnalysedMesh ()
 Destructor. More...
 
const BaseMeshDataanalyseBaseMesh (const Ogre::v1::Mesh &ogreMesh)
 Analyse the base mesh and fill the shape data. More...
 
const BaseMeshDatagetBaseMeshData ()
 Get the base mesh data. More...
 
void transformVertices (const Transform &transform)
 Transforms the vertex data by a specified transformation (e.g. for intersection tests) More...
 
void getBoxAabb (glm::vec3 &minBound, glm::vec3 &maxBound)
 Get the axis aligned bounding box of transformed vertices. More...
 
bool intersect (const glm::vec3 &rayOrigin, const glm::vec3 &rayDirection, glm::vec3 &intersectionPoint)
 Get intersection point of ray and triangles. More...
 
bool intersectUp (const glm::vec3 &rayOrigin, glm::vec3 &intersectionPoint)
 Get intersection point of a up-ray and triangles. More...
 

Detailed Description

Mesh analysing manager class.

Todo:
TODO(np) This class is under construction It will need a manager class that holds descriptions of base meshes, so that meshes only analysed once

Definition at line 57 of file AnalysedMesh.h.

Constructor & Destructor Documentation

qsf::AnalysedMesh::AnalysedMesh ( )

Default constructor.

qsf::AnalysedMesh::~AnalysedMesh ( )

Destructor.

Note
  • Not virtual by intent

Member Function Documentation

const BaseMeshData* qsf::AnalysedMesh::analyseBaseMesh ( const Ogre::v1::Mesh &  ogreMesh)

Analyse the base mesh and fill the shape data.

const BaseMeshData* qsf::AnalysedMesh::getBaseMeshData ( )

Get the base mesh data.

void qsf::AnalysedMesh::getBoxAabb ( glm::vec3 &  minBound,
glm::vec3 &  maxBound 
)

Get the axis aligned bounding box of transformed vertices.

Parameters
[out]minBoundReceives the minimum bound of the AABB
[out]maxBoundReceives the maximum bound of the AABB
bool qsf::AnalysedMesh::intersect ( const glm::vec3 &  rayOrigin,
const glm::vec3 &  rayDirection,
glm::vec3 &  intersectionPoint 
)

Get intersection point of ray and triangles.

Parameters
[in]rayOriginOrigin of ray
[in]rayDirectionDirection of ray
[out]intersectionPointReceives the local space triangle hit position
Returns
"true" if a triangle has been hit, else "false"
bool qsf::AnalysedMesh::intersectUp ( const glm::vec3 &  rayOrigin,
glm::vec3 &  intersectionPoint 
)

Get intersection point of a up-ray and triangles.

Parameters
[in]rayOriginOrigin of ray
[out]intersectionPointReceives the local space triangle hit position
Returns
"true" if a triangle has been hit, else "false"
Note
  • This function has much more performance then intersect method
void qsf::AnalysedMesh::transformVertices ( const Transform transform)

Transforms the vertex data by a specified transformation (e.g. for intersection tests)

Parameters
[in]transformTransformation

The documentation for this class was generated from the following file: