VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCDBDebugUtils.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 #pragma once
6 
10 
11 #include <map>
12 
13 #include <osg/Vec4>
14 #include <osgEarth/GeoData>
15 
16 namespace osg
17 {
18  class Group;
19 }
20 
21 namespace osgEarth
22 {
23  class SpatialReference;
24  class MapNode;
25 }
26 
27 namespace makVrv { namespace oe { namespace CDB {
28 
29  class CDBTileKey;
30 
33  {
34  public:
37  static osg::Vec4f getDebugColor(int lod);
38 
40  static void addDebugText(const std::string& text, const osgEarth::GeoPoint& point,
41  osg::Group* groupNode, osgEarth::MapNode* mapNode, float lodDistance=500.0f);
42 
44  static void addTileLabel(const CDBTileKey& key, osg::Group* groupNode
45  , osgEarth::SpatialReference* srs
46  , osgEarth::MapNode* mapNode);
47 
49  static void setupDebugColor(int lod, osg::Group* attachPoint);
50  private:
52  typedef std::map< int, osg::Vec4f > MapLODToDebugColor;
55 
57  static bool initDebugColorMap();
59  static const bool debugColorMapInitialized;
60  };
61 
62 }}}
Hold the unique CDB tile key information CDB LOD goes from -10 to 23. Negative keys to zero are all 1...
Definition: DtCDBTileKey.h:28
static void addTileLabel(const CDBTileKey &key, osg::Group *groupNode, osgEarth::SpatialReference *srs, osgEarth::MapNode *mapNode)
Display debug information (boxes and Lod text)
static const bool debugColorMapInitialized
bool that tell id the table map was initialized
Definition: DtCDBDebugUtils.h:59
static bool initDebugColorMap()
Create a color map table for debug mode.
static MapLODToDebugColor myMapLODToDebugColor
A color map mapping lods to colors.
Definition: DtCDBDebugUtils.h:54
std::map< int, osg::Vec4f > MapLODToDebugColor
A color map mapping lods to colors typedef.
Definition: DtCDBDebugUtils.h:52
static osg::Vec4f getDebugColor(int lod)
return a different debug color based on the CDB lod. These are arbritary colors
static void addDebugText(const std::string &text, const osgEarth::GeoPoint &point, osg::Group *groupNode, osgEarth::MapNode *mapNode, float lodDistance=500.0f)
Display debug information (ex. light point code)
static void setupDebugColor(int lod, osg::Group *attachPoint)
setup the debug color for models
Debug utility class.
Definition: DtCDBDebugUtils.h:32

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)