Panda3D
cullHandler.cxx
1 // Filename: cullHandler.cxx
2 // Created by: drose (23Feb02)
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 "cullHandler.h"
16 #include "cullableObject.h"
17 #include "geom.h"
18 #include "transformState.h"
19 #include "renderState.h"
20 #include "pnotify.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Function: CullHandler::Constructor
24 // Access: Public
25 // Description:
26 ////////////////////////////////////////////////////////////////////
27 CullHandler::
28 CullHandler() {
29 }
30 
31 ////////////////////////////////////////////////////////////////////
32 // Function: CullHandler::Destructor
33 // Access: Public, Virtual
34 // Description:
35 ////////////////////////////////////////////////////////////////////
36 CullHandler::
37 ~CullHandler() {
38 }
39 
40 ////////////////////////////////////////////////////////////////////
41 // Function: CullHandler::record_object
42 // Access: Public, Virtual
43 // Description: This callback function is intended to be overridden
44 // by a derived class. This is called as each Geom is
45 // discovered by the CullTraverser.
46 //
47 // The CullHandler becomes the owner of the
48 // CullableObject pointer and is expected to delete it
49 // later.
50 ////////////////////////////////////////////////////////////////////
51 void CullHandler::
52 record_object(CullableObject *object, const CullTraverser *traverser) {
53  nout << *object->_geom << " " << *object->_internal_transform << " "
54  << *object->_state << "\n";
55  delete object;
56 }
57 
58 ////////////////////////////////////////////////////////////////////
59 // Function: CullHandler::end_traverse
60 // Access: Public, Virtual
61 // Description: This callback function is intended to be overridden
62 // by a derived class. This is called at the end of the
63 // traversal.
64 ////////////////////////////////////////////////////////////////////
65 void CullHandler::
67 }
virtual void end_traverse()
This callback function is intended to be overridden by a derived class.
Definition: cullHandler.cxx:66
The smallest atom of cull.
virtual void record_object(CullableObject *object, const CullTraverser *traverser)
This callback function is intended to be overridden by a derived class.
Definition: cullHandler.cxx:52
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling...
Definition: cullTraverser.h:48