00001 // Filename: cullableObject.cxx 00002 // Created by: drose (04Mar02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #include "cullableObject.h" 00020 00021 00022 CullableObject *CullableObject::_deleted_chain = (CullableObject *)NULL; 00023 int CullableObject::_num_ever_allocated = 0; 00024 TypeHandle CullableObject::_type_handle; 00025 00026 //////////////////////////////////////////////////////////////////// 00027 // Function: CullableObject::Destructor 00028 // Access: Public 00029 // Description: Automatically deletes the whole chain of these things. 00030 //////////////////////////////////////////////////////////////////// 00031 CullableObject:: 00032 ~CullableObject() { 00033 if (_next != (CullableObject *)NULL) { 00034 delete _next; 00035 } 00036 } 00037 00038 //////////////////////////////////////////////////////////////////// 00039 // Function: CullableObject::output 00040 // Access: Public 00041 // Description: 00042 //////////////////////////////////////////////////////////////////// 00043 void CullableObject:: 00044 output(ostream &out) const { 00045 if (_geom != (Geom *)NULL) { 00046 out << *_geom; 00047 } else { 00048 out << "(null)"; 00049 } 00050 }