1 // tile.cxx -- routines to handle a scenery tile
3 // Written by Curtis Olson, started May 1998.
5 // Copyright (C) 1998 Curtis L. Olson - curt@infoplane.com
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #include <Include/compiler.h>
26 #include STL_FUNCTIONAL
27 #include STL_ALGORITHM
29 #include <Debug/logstream.hxx>
30 #include <Scenery/tile.hxx>
31 #include "Bucket/newbucket.hxx"
35 FG_USING_STD(for_each);
36 FG_USING_STD(mem_fun_ref);
40 fgTILE::fgTILE ( void )
41 : nodes(new double[MAX_NODES][3]),
49 fgTILE::~fgTILE ( void ) {
54 // Step through the fragment list, deleting the display list, then
55 // the fragment, until the list is empty.
57 fgTILE::release_fragments()
59 FG_LOG( FG_TERRAIN, FG_DEBUG,
60 "FREEING TILE = (" << tile_bucket << ")" );
61 for_each( begin(), end(),
62 mem_fun_ref( &fgFRAGMENT::deleteDisplayList ));
63 fragment_list.erase( begin(), end() );