Changeset 9418 in orxonox.OLD for branches/terrain/src
- Timestamp:
- Jul 24, 2006, 1:25:27 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/terrain/src/lib/graphics/importer/terrain/terrain_quad.cc
r9414 r9418 1 1 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 4 4 Copyright (C) 2006 orx 5 5 6 6 This program is free software; you can redistribute it and/or modify 7 7 it under the terms of the GNU General Public License as published by 8 8 the Free Software Foundation; either version 2, or (at your option) 9 9 any later version. 10 10 11 11 ### File Specific: 12 12 main programmer: Marco Biasini 13 13 14 14 */ 15 15 #include "terrain_quad.h" … … 25 25 26 26 TerrainQuad::TerrainQuad( Terrain *_owner, int _x0, int _z0, int _x1, int _z1 ) 27 : owner( _owner ), xOffset( _x0 ), zOffset( _z0 ), 27 : owner( _owner ), xOffset( _x0 ), zOffset( _z0 ), 28 28 width( _x1-_x0 ), height( _z1-_z0 ) 29 29 { … … 37 37 } 38 38 39 /** 39 /** 40 40 * Recalculate the bounds of this TerrainQuad. It could be optimized, but how 41 41 * often is this method really used? … … 46 46 printf( "Cannot calculate bounds for a childless terrain quad.\n" ); 47 47 exit( 0 ); 48 } 48 } 49 49 Vector min = Vector( children[BL_CHILD]->getBounds().min() ); 50 50 Vector max = Vector( children[TR_CHILD]->getBounds().max() ); … … 52 52 pTerrainQuad child = children[i]; 53 53 min.y = fmin( child->bounds.min().y, min.y ); 54 max.y = fmax( child->bounds.max().y, max.y ); 54 max.y = fmax( child->bounds.max().y, max.y ); 55 55 } 56 56 bounds.set( min, max );
Note: See TracChangeset
for help on using the changeset viewer.