Panda3D
Loading...
Searching...
No Matches
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 */
21
22/**
23 *
24 */
27 CollisionSolid(copy)
28{
29}
30
31/**
32 * Flushes the PStatCollectors used during traversal.
33 */
36 _volume_pcollector.flush_level();
37 _test_pcollector.flush_level();
38}
39
40/**
41 * store away a vertex to index against
42 */
44add_vertex(const LPoint3 &vert) {
45 _vertices.push_back(vert);
46}
47
48INLINE unsigned int CollisionFloorMesh::
49get_num_vertices() const {
50 return _vertices.size();
51}
52
53INLINE const LPoint3 &CollisionFloorMesh::
54get_vertex(unsigned int index) const {
55 return _vertices[index];
56}
57
58INLINE unsigned int CollisionFloorMesh::
59get_num_triangles() const {
60 return _triangles.size();
61}
62
63INLINE LPoint3i CollisionFloorMesh::
64get_triangle(unsigned int index) const {
65 CollisionFloorMesh::TriangleIndices tri = _triangles[index];
66 return LPoint3i(tri.p1, tri.p2, tri.p3);
67}
This object represents a solid made entirely of triangles, which will only be tested again z axis ali...
static void flush_level()
Flushes the PStatCollectors used during traversal.
void add_vertex(const LPoint3 &vert)
store away a vertex to index against
CollisionFloorMesh()
This is only for the convenience of CollisionPolygon.
The abstract base class for all things that can collide with other things in the world,...