#include <BulletMesh.h>
Inheritance diagram for Track::BulletMesh:
Public Types | |
typedef std::pair< std::string, unsigned int > | ConstructionInformation |
A type used to construct the mesh. Works exactly like Mesh(std::string, unsigned int). | |
Public Member Functions | |
BulletMesh (std::string filename, unsigned int generators=genererator_triangle_mesh_bit, DrawableMesh::RenderMode render_mode=DrawableMesh::RM_SOLID) | |
Construct some objects from the mesh specifed by the file given. | |
BulletMesh (std::istream &source, unsigned int generators=genererator_triangle_mesh_bit, DrawableMesh::RenderMode render_mode=DrawableMesh::RM_SOLID) | |
Construct some objects from the mesh specified by a stream. | |
BulletMesh (ConstructionInformation construction_information) | |
Construct from a ConstructionInformation object. | |
virtual | ~BulletMesh () |
btConvexHullShape * | get_convex_hull_shape () |
Get the convex hull of the vertices in the mesh. | |
btBvhTriangleMeshShape * | get_triangle_shape () |
Get a Bullet btBvhTriangleMeshShape representing the faces in the mesh. | |
Static Public Attributes | |
static const unsigned int | genererator_convex_hull_bit = 2 |
bit mask to create a convex hull of the points in the mesh for bullet. | |
static const unsigned int | genererator_triangle_mesh_bit = 4 |
bit mask to create a triangle mesh of the mesh for bullet. | |
Private Member Functions | |
BulletMesh (const BulletMesh &source) | |
BulletMesh & | operator= (const BulletMesh &source) |
void | create (unsigned int generators=genererator_triangle_mesh_bit) |
Create the triangle / convex hull shape. | |
Private Attributes | |
btConvexHullShape * | simplified_convex_shape |
btBvhTriangleMeshShape * | triangle_mesh_shape |
btTriangleMesh * | triangle_mesh |
When created you should use bit masks for the type of shape you want to produce: a convex hull (fastest for moving objects), a triangle mesh for the bullet physics library (good for static geometry), or both.
Definition at line 34 of file BulletMesh.h.
typedef std::pair<std::string, unsigned int> Track::BulletMesh::ConstructionInformation |
A type used to construct the mesh. Works exactly like Mesh(std::string, unsigned int).
Definition at line 69 of file BulletMesh.h.
Track::BulletMesh::BulletMesh | ( | const BulletMesh & | source | ) | [private] |
Track::BulletMesh::BulletMesh | ( | std::string | filename, | |
unsigned int | generators = genererator_triangle_mesh_bit , |
|||
DrawableMesh::RenderMode | render_mode = DrawableMesh::RM_SOLID | |||
) |
Construct some objects from the mesh specifed by the file given.
filename | The name and path of a file containing the mesh to load. | |
generators | A bit mask made from the above three constants to determine which objects to create. | |
render_mode | The method to use to draw the mesh. |
Definition at line 25 of file BulletMesh.cpp.
Track::BulletMesh::BulletMesh | ( | std::istream & | source, | |
unsigned int | generators = genererator_triangle_mesh_bit , |
|||
DrawableMesh::RenderMode | render_mode = DrawableMesh::RM_SOLID | |||
) |
Construct some objects from the mesh specified by a stream.
generators | A bit mask made from the generator constants to determine which objects to create. | |
source | The stream to load the mesh from. | |
render_mode | The method to use to draw the mesh. |
Definition at line 34 of file BulletMesh.cpp.
Track::BulletMesh::BulletMesh | ( | ConstructionInformation | construction_information | ) |
Track::BulletMesh::~BulletMesh | ( | ) | [virtual] |
Definition at line 102 of file BulletMesh.cpp.
void Track::BulletMesh::create | ( | unsigned int | generators = genererator_triangle_mesh_bit |
) | [private] |
btConvexHullShape * Track::BulletMesh::get_convex_hull_shape | ( | ) |
Get the convex hull of the vertices in the mesh.
It should be efficent for calculating physics when used for a moving object.
Definition at line 110 of file BulletMesh.cpp.
btBvhTriangleMeshShape * Track::BulletMesh::get_triangle_shape | ( | ) |
Get a Bullet btBvhTriangleMeshShape representing the faces in the mesh.
It is uesful for static geometry.
Definition at line 115 of file BulletMesh.cpp.
BulletMesh& Track::BulletMesh::operator= | ( | const BulletMesh & | source | ) | [private] |
const unsigned int Track::BulletMesh::genererator_convex_hull_bit = 2 [static] |
bit mask to create a convex hull of the points in the mesh for bullet.
Definition at line 43 of file BulletMesh.h.
const unsigned int Track::BulletMesh::genererator_triangle_mesh_bit = 4 [static] |
bit mask to create a triangle mesh of the mesh for bullet.
Definition at line 45 of file BulletMesh.h.
btConvexHullShape* Track::BulletMesh::simplified_convex_shape [private] |
Definition at line 93 of file BulletMesh.h.
btTriangleMesh* Track::BulletMesh::triangle_mesh [private] |
Definition at line 95 of file BulletMesh.h.
btBvhTriangleMeshShape* Track::BulletMesh::triangle_mesh_shape [private] |
Definition at line 94 of file BulletMesh.h.
Generated at Mon Sep 6 00:41:18 2010 by Doxygen version 1.4.7 for Racer version svn335.