00001 // Filename: cullHandler.cxx 00002 // Created by: drose (23Feb02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "cullHandler.h" 00016 #include "cullableObject.h" 00017 #include "geom.h" 00018 #include "transformState.h" 00019 #include "renderState.h" 00020 #include "pnotify.h" 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Function: CullHandler::Constructor 00024 // Access: Public 00025 // Description: 00026 //////////////////////////////////////////////////////////////////// 00027 CullHandler:: 00028 CullHandler() { 00029 } 00030 00031 //////////////////////////////////////////////////////////////////// 00032 // Function: CullHandler::Destructor 00033 // Access: Public, Virtual 00034 // Description: 00035 //////////////////////////////////////////////////////////////////// 00036 CullHandler:: 00037 ~CullHandler() { 00038 } 00039 00040 //////////////////////////////////////////////////////////////////// 00041 // Function: CullHandler::record_object 00042 // Access: Public, Virtual 00043 // Description: This callback function is intended to be overridden 00044 // by a derived class. This is called as each Geom is 00045 // discovered by the CullTraverser. 00046 // 00047 // The CullHandler becomes the owner of the 00048 // CullableObject pointer and is expected to delete it 00049 // later. 00050 //////////////////////////////////////////////////////////////////// 00051 void CullHandler:: 00052 record_object(CullableObject *object, const CullTraverser *traverser) { 00053 nout << *object->_geom << " " << *object->_modelview_transform << " " 00054 << *object->_state << "\n"; 00055 delete object; 00056 } 00057 00058 //////////////////////////////////////////////////////////////////// 00059 // Function: CullHandler::end_traverse 00060 // Access: Public, Virtual 00061 // Description: This callback function is intended to be overridden 00062 // by a derived class. This is called at the end of the 00063 // traversal. 00064 //////////////////////////////////////////////////////////////////// 00065 void CullHandler:: 00066 end_traverse() { 00067 } 00068