Panda3D
collisionFloorMesh.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file collisionFloorMesh.I
10  * @author zpavlov
11  * @date 2007-06-28
12  */
13 
14 /**
15  * This is only for the convenience of CollisionPolygon. Normally, you should
16  * not attempt to create an uninitialized CollisionPlane.
17  */
20 }
21 
22 /**
23  *
24  */
27  CollisionSolid(copy)
28 {
29 }
30 
31 /**
32  * Flushes the PStatCollectors used during traversal.
33  */
34 INLINE void CollisionFloorMesh::
36  _volume_pcollector.flush_level();
37  _test_pcollector.flush_level();
38 }
39 
40 /**
41  * store away a vertex to index against
42  */
43 INLINE void CollisionFloorMesh::
44 add_vertex(const LPoint3 &vert) {
45  _vertices.push_back(vert);
46 }
47 
48 INLINE unsigned int CollisionFloorMesh::
49 get_num_vertices() const {
50  return _vertices.size();
51 }
52 
53 INLINE const LPoint3 &CollisionFloorMesh::
54 get_vertex(unsigned int index) const {
55  return _vertices[index];
56 }
57 
58 INLINE unsigned int CollisionFloorMesh::
59 get_num_triangles() const {
60  return _triangles.size();
61 }
62 
63 INLINE LPoint3i CollisionFloorMesh::
64 get_triangle(unsigned int index) const {
65  CollisionFloorMesh::TriangleIndices tri = _triangles[index];
66  return LPoint3i(tri.p1, tri.p2, tri.p3);
67 }
The abstract base class for all things that can collide with other things in the world, and all the things they can collide with (except geometry).
CollisionFloorMesh()
This is only for the convenience of CollisionPolygon.
static void flush_level()
Flushes the PStatCollectors used during traversal.
void add_vertex(const LPoint3 &vert)
store away a vertex to index against
This object represents a solid made entirely of triangles, which will only be tested again z axis ali...