osgEarth 2.1.1

/home/cube/sources/osgearth/src/osgEarthDrivers/engine_droam/Common

Go to the documentation of this file.
00001 /* -*-c++-*- */
00002 /* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
00003  * Copyright 2008-2010 Pelican Mapping
00004  * http://osgearth.org
00005  *
00006  * osgEarth is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU Lesser General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public License
00017  * along with this program.  If not, see <http://www.gnu.org/licenses/>
00018  */
00019 #ifndef OSGEARTH_DROAM_ENGINE_COMMON_H
00020 #define OSGEARTH_DROAM_ENGINE_COMMON_H 1
00021 
00022 #include <osgEarth/Common>
00023 
00024 //typedef unsigned int   VertexIndex;    // index into the VBO
00025 typedef unsigned int   NodeIndex;      // index of a node in the mesh node container
00026 typedef unsigned short Level;          // LOD level number
00027 typedef short          ChildIndex;     // -1 = invalid
00028 typedef short          AncestorIndex;  // -1 = invalid
00029 typedef int            TravNumber;     // mesh traversal number
00030 
00031 
00032 #define WHITE   osg::Vec4f(1,1,1,1)
00033 #define RED     osg::Vec4f(1,0,0,1)
00034 #define BLUE    osg::Vec4f(0,0,1,1)
00035 #define GREEN   osg::Vec4f(0,1,0,1)
00036 #define YELLOW  osg::Vec4f(1,1,0,1)
00037 #define MAGENTA osg::Vec4f(1,0,1,1)
00038 #define CYAN    osg::Vec4f(0,1,1,1)
00039 
00040 
00041 // the number of verts to initial reserve in the shared VBO:
00042 #define RESERVED_VERTICES 20000
00043 
00044 // define this to employ a queue for refreshing diamonds' primitive sets & tex coords in UPDATE:
00045 #define USE_DIRTY_QUEUE
00046 
00047 // define this to apply textures to the quadtree diamonds:
00048 #define USE_TEXTURES
00049 
00050 // DEBUGGING: define this to apply simulated "debugging" textures instead of fetching them from MapLayer (for testing):
00051 //#define USE_DEBUG_TEXTURES
00052 
00053 // DEBUGGING: define this to set a color array on the shared VBO, and to apply colors based on LOD level (for testing):
00054 //#define USE_VERTEX_COLORS
00055 
00056 // DEBUGGING: draw a green outline around each texture
00057 //#define OUTLINE_TEXTURES
00058 
00059 // the highest LOD level at which diamond splits can occur:
00060 #define MAX_ACTIVE_LEVEL 30
00061 
00062 // maximum number of split, merge, and image jobs to complete per UPDATE frame
00063 // (todo: replace with time quota)
00064 #define MAX_JOBS_PER_FRAME 10
00065 
00066 // maximum subdivision level that can split and merge
00067 #define MAX_ACTIVE_LEVEL 30
00068 
00069 // multiple this # by the diamond bounding sphere radius for switch-in/out distance:
00070 #define CULL_RANGE_FACTOR 2
00071 
00072 // density of each AMR patch (number of rows/cols)
00073 #define AMR_PATCH_ROWS 8
00074 
00075 // whether to use the geodetic manifold (or the cube manifold, the default)
00076 //#define USE_GEODETIC_MANIFOLD 1
00077 
00078 
00079 #endif // OSGEARTH_DROAM_ENGINE_COMMON_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines