Panda3D
collisionGeom.cxx
1 // Filename: collisionGeom.cxx
2 // Created by: drose (01Mar06)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "collisionGeom.h"
16 
17 PStatCollector CollisionGeom::_volume_pcollector("Collision Volumes:CollisionGeom");
18 PStatCollector CollisionGeom::_test_pcollector("Collision Tests:CollisionGeom");
19 TypeHandle CollisionGeom::_type_handle;
20 
21 ////////////////////////////////////////////////////////////////////
22 // Function: CollisionGeom::make_copy
23 // Access: Public, Virtual
24 // Description:
25 ////////////////////////////////////////////////////////////////////
26 CollisionSolid *CollisionGeom::
27 make_copy() {
28  return new CollisionGeom(*this);
29 }
30 
31 ////////////////////////////////////////////////////////////////////
32 // Function: CollisionGeom::get_volume_pcollector
33 // Access: Public, Virtual
34 // Description: Returns a PStatCollector that is used to count the
35 // number of bounding volume tests made against a solid
36 // of this type in a given frame.
37 ////////////////////////////////////////////////////////////////////
40  return _volume_pcollector;
41 }
42 
43 ////////////////////////////////////////////////////////////////////
44 // Function: CollisionGeom::get_test_pcollector
45 // Access: Public, Virtual
46 // Description: Returns a PStatCollector that is used to count the
47 // number of intersection tests made against a solid
48 // of this type in a given frame.
49 ////////////////////////////////////////////////////////////////////
52  return _test_pcollector;
53 }
54 
55 ////////////////////////////////////////////////////////////////////
56 // Function: CollisionGeom::output
57 // Access: Public, Virtual
58 // Description:
59 ////////////////////////////////////////////////////////////////////
60 void CollisionGeom::
61 output(ostream &out) const {
62  out << "cgeom";
63 }
virtual PStatCollector & get_volume_pcollector()
Returns a PStatCollector that is used to count the number of bounding volume tests made against a sol...
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).
A lightweight class that represents a single element that may be timed and/or counted via stats...
A special CollisionPolygon created just for the purpose of detecting collision against geometry...
Definition: collisionGeom.h:33
virtual PStatCollector & get_test_pcollector()
Returns a PStatCollector that is used to count the number of intersection tests made against a solid ...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85