//C++ header - Open Scene Graph - Copyright (C) 1998-2002 Robert Osfield //Distributed under the terms of the GNU Library General Public License (LGPL) //as published by the Free Software Foundation. #ifndef OSG_LOD #define OSG_LOD 1 #include namespace osg { /** LOD - Level Of Detail group node which allows switching between children depending on distance from eye point. Typical uses are for load balancing - objects further away from the eye point are rendered at a lower level of detail, and at times of high stress on the graphics pipeline lower levels of detail can also be chosen. The children are ordered from most detailed (for close up views) to the least (see from a distance), and a set of ranges are used to decide which LOD is used at different view distances, the criteria used is child 'i' is used when range[i]evaluateLODChild(this,eye_local,bias); else return evaluateLODChild(eye_local,bias); } virtual const int evaluateLODChild(const Vec3& eye_local,const float bias) const; protected : virtual ~LOD() {} typedef std::vector RangeList; RangeList _rangeList; RangeList _rangeList2; ref_ptr _evaluateLODCallback; Vec3 _center; }; } #endif