~ubuntu-branches/debian/sid/osgearth/sid

« back to all changes in this revision

Viewing changes to src/osgEarthDrivers/engine_droam/Common

  • Committer: Bazaar Package Importer
  • Author(s): Pirmin Kalberer
  • Date: 2011-07-14 22:13:36 UTC
  • Revision ID: james.westby@ubuntu.com-20110714221336-94igk9rskxveh794
Tags: upstream-2.0+dfsg
ImportĀ upstreamĀ versionĀ 2.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*-c++-*- */
 
2
/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
 
3
 * Copyright 2008-2010 Pelican Mapping
 
4
 * http://osgearth.org
 
5
 *
 
6
 * osgEarth is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU Lesser General Public License as published by
 
8
 * the Free Software Foundation; either version 2 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU Lesser General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU Lesser General Public License
 
17
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 
18
 */
 
19
#ifndef OSGEARTH_DROAM_ENGINE_COMMON_H
 
20
#define OSGEARTH_DROAM_ENGINE_COMMON_H 1
 
21
 
 
22
#include <osgEarth/Common>
 
23
 
 
24
//typedef unsigned int   VertexIndex;    // index into the VBO
 
25
typedef unsigned int   NodeIndex;      // index of a node in the mesh node container
 
26
typedef unsigned short Level;          // LOD level number
 
27
typedef short          ChildIndex;     // -1 = invalid
 
28
typedef short          AncestorIndex;  // -1 = invalid
 
29
typedef int            TravNumber;     // mesh traversal number
 
30
 
 
31
 
 
32
#define WHITE   osg::Vec4f(1,1,1,1)
 
33
#define RED     osg::Vec4f(1,0,0,1)
 
34
#define BLUE    osg::Vec4f(0,0,1,1)
 
35
#define GREEN   osg::Vec4f(0,1,0,1)
 
36
#define YELLOW  osg::Vec4f(1,1,0,1)
 
37
#define MAGENTA osg::Vec4f(1,0,1,1)
 
38
#define CYAN    osg::Vec4f(0,1,1,1)
 
39
 
 
40
 
 
41
// the number of verts to initial reserve in the shared VBO:
 
42
#define RESERVED_VERTICES 20000
 
43
 
 
44
// define this to employ a queue for refreshing diamonds' primitive sets & tex coords in UPDATE:
 
45
#define USE_DIRTY_QUEUE
 
46
 
 
47
// define this to apply textures to the quadtree diamonds:
 
48
#define USE_TEXTURES
 
49
 
 
50
// DEBUGGING: define this to apply simulated "debugging" textures instead of fetching them from MapLayer (for testing):
 
51
//#define USE_DEBUG_TEXTURES
 
52
 
 
53
// DEBUGGING: define this to set a color array on the shared VBO, and to apply colors based on LOD level (for testing):
 
54
//#define USE_VERTEX_COLORS
 
55
 
 
56
// DEBUGGING: draw a green outline around each texture
 
57
//#define OUTLINE_TEXTURES
 
58
 
 
59
// the highest LOD level at which diamond splits can occur:
 
60
#define MAX_ACTIVE_LEVEL 30
 
61
 
 
62
// maximum number of split, merge, and image jobs to complete per UPDATE frame
 
63
// (todo: replace with time quota)
 
64
#define MAX_JOBS_PER_FRAME 10
 
65
 
 
66
// maximum subdivision level that can split and merge
 
67
#define MAX_ACTIVE_LEVEL 30
 
68
 
 
69
// multiple this # by the diamond bounding sphere radius for switch-in/out distance:
 
70
#define CULL_RANGE_FACTOR 2
 
71
 
 
72
// density of each AMR patch (number of rows/cols)
 
73
#define AMR_PATCH_ROWS 8
 
74
 
 
75
// whether to use the geodetic manifold (or the cube manifold, the default)
 
76
//#define USE_GEODETIC_MANIFOLD 1
 
77
 
 
78
 
 
79
#endif // OSGEARTH_DROAM_ENGINE_COMMON_H