Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/pgraph/cullBinUnsorted.cxx

Go to the documentation of this file.
00001 // Filename: cullBinUnsorted.cxx
00002 // Created by:  drose (28Feb02)
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 "cullBinUnsorted.h"
00020 #include "cullHandler.h"
00021 #include "graphicsStateGuardianBase.h"
00022 
00023 
00024 TypeHandle CullBinUnsorted::_type_handle;
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //     Function: CullBinUnsorted::Destructor
00028 //       Access: Public, Virtual
00029 //  Description: 
00030 ////////////////////////////////////////////////////////////////////
00031 CullBinUnsorted::
00032 ~CullBinUnsorted() {
00033   Objects::iterator oi;
00034   for (oi = _objects.begin(); oi != _objects.end(); ++oi) {
00035     CullableObject *object = (*oi);
00036     delete object;
00037   }
00038 }
00039 
00040 ////////////////////////////////////////////////////////////////////
00041 //     Function: CullBinUnsorted::add_object
00042 //       Access: Public, Virtual
00043 //  Description: Adds a geom, along with its associated state, to
00044 //               the bin for rendering.
00045 ////////////////////////////////////////////////////////////////////
00046 void CullBinUnsorted::
00047 add_object(CullableObject *object) {
00048   _objects.push_back(object);
00049 }
00050 
00051 ////////////////////////////////////////////////////////////////////
00052 //     Function: CullBinUnsorted::draw
00053 //       Access: Public
00054 //  Description: Draws all the objects in the bin, in the appropriate
00055 //               order.
00056 ////////////////////////////////////////////////////////////////////
00057 void CullBinUnsorted::
00058 draw() {
00059   Objects::iterator oi;
00060   for (oi = _objects.begin(); oi != _objects.end(); ++oi) {
00061     CullableObject *object = (*oi);
00062     CullHandler::draw(object, _gsg);
00063   }
00064 }
00065 

Generated on Fri May 2 00:41:26 2003 for Panda by doxygen1.3