#include <lugre_meshshape.h>

Public Member Functions | |
| MeshShape (Ogre::MeshPtr pMesh) | |
| ~MeshShape () | |
| void | Update (Ogre::Entity *pEntity) |
| void | RayIntersect (const Ogre::Vector3 &ray_origin, const Ogre::Vector3 &ray_dir, std::vector< std::pair< float, int > > &pHitList) |
| int | RayIntersect (const Ogre::Vector3 &ray_origin, const Ogre::Vector3 &ray_dir, float *pfHitDist=0) |
Static Public Member Functions | |
| static MeshShape * | GetMeshShape (Ogre::Entity *pEntity) |
Public Attributes | |
| bool | mbInitialised |
| false if still has to be initialised (reads out mesh data only on demand) | |
| Ogre::MeshPtr | mpMesh |
| Ogre::Vector3 | mvMin |
| Ogre::Vector3 | mvMax |
| std::vector< Ogre::Vector3 > | mlVertices |
| std::vector< int > | mlIndices |
Definition at line 36 of file lugre_meshshape.h.
| Lugre::MeshShape::MeshShape | ( | Ogre::MeshPtr | pMesh | ) |
| Lugre::MeshShape::~MeshShape | ( | ) |
Definition at line 35 of file lugre_meshshape.cpp.
| void Lugre::MeshShape::Update | ( | Ogre::Entity * | pEntity | ) |
reads out mesh vertices and indices must be called before rayintersect if the mesh has moved/deformed, probably every frame for animated meshes and mousepicking calling it once for static meshes is enough code is based on OgreOpCode MeshCollisionShape::convertMeshData
Definition at line 132 of file lugre_meshshape.cpp.
References mbInitialised, mlIndices, mlVertices, mpMesh, mvMax, and mvMin.
Referenced by GetMeshShape(), and l_IterateOverMeshTriangles().
| void Lugre::MeshShape::RayIntersect | ( | const Ogre::Vector3 & | ray_origin, | |
| const Ogre::Vector3 & | ray_dir, | |||
| std::vector< std::pair< float, int > > & | pHitList | |||
| ) |
Definition at line 263 of file lugre_meshshape.cpp.
References Lugre::IntersectRayTriangle(), mlIndices, mlVertices, mpMesh, mvMax, mvMin, and Lugre::mymax().
Referenced by Lugre::cOgreWrapper::RayEntityQuery().
| int Lugre::MeshShape::RayIntersect | ( | const Ogre::Vector3 & | ray_origin, | |
| const Ogre::Vector3 & | ray_dir, | |||
| float * | pfHitDist = 0 | |||
| ) |
| MeshShape * Lugre::MeshShape::GetMeshShape | ( | Ogre::Entity * | pEntity | ) | [static] |
Definition at line 18 of file lugre_meshshape.cpp.
References assert, Lugre::gMeshShapeCache, MeshShape(), and Update().
Referenced by Lugre::cOgreWrapper::GetEntityIndexCount(), Lugre::cOgreWrapper::GetEntityVertex(), Lugre::cOgreWrapper::RayEntityQuery(), and Lugre::cGfx3D::SetWireBoundingBox().
false if still has to be initialised (reads out mesh data only on demand)
Definition at line 37 of file lugre_meshshape.h.
Referenced by Update().
| Ogre::MeshPtr Lugre::MeshShape::mpMesh |
| Ogre::Vector3 Lugre::MeshShape::mvMin |
Definition at line 44 of file lugre_meshshape.h.
Referenced by l_IterateOverMeshTriangles(), RayIntersect(), Lugre::cGfx3D::SetWireBoundingBox(), and Update().
| Ogre::Vector3 Lugre::MeshShape::mvMax |
Definition at line 45 of file lugre_meshshape.h.
Referenced by l_IterateOverMeshTriangles(), RayIntersect(), Lugre::cGfx3D::SetWireBoundingBox(), and Update().
| std::vector<Ogre::Vector3> Lugre::MeshShape::mlVertices |
Definition at line 46 of file lugre_meshshape.h.
Referenced by Lugre::cOgreWrapper::GetEntityVertex(), l_IterateOverMeshTriangles(), RayIntersect(), and Update().
| std::vector<int> Lugre::MeshShape::mlIndices |
Definition at line 47 of file lugre_meshshape.h.
Referenced by Lugre::cOgreWrapper::GetEntityIndexCount(), Lugre::cOgreWrapper::GetEntityVertex(), l_IterateOverMeshTriangles(), RayIntersect(), and Update().
1.5.6