VR-Forces 4.7 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
osgdb_osgearth_model_cdb
DtCDBGroupNode.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright(c) 2017 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
#pragma once
10
11
#include <osg/Group>
12
#include <osg/MatrixTransform>
13
#include <
osgdb_osgearth_model_cdb/DtCDBTileKey.h
>
14
#define DTCDGROUPNODE_DEBUG 0
15
16
#include <
vrvOsg/DtOsgThreadingUtils.h
>
17
#include <tbb/atomic.h>
18
19
namespace
makVrv {
20
namespace
oe {
21
namespace
CDB
22
{
23
class
CDBTileKey;
24
class
CdbGroupNode;
25
class
CdbGroupNodeObserver
26
{
27
public
:
28
virtual
void
CdbGroupNode_Deleted
(
CdbGroupNode
* node) = 0;
29
};
30
31
typedef
enum
Quadrant
32
{
33
LOWER_LEFT
= 0
34
,
LOWER_RIGHT
= 1
35
,
UPPER_LEFT
= 2
36
,
UPPER_RIGHT
= 3
37
,
NUM_QUADRANTS
= 4
38
,
INVALID
= -1
39
};
40
55
56
class
CdbGroupNode
:
public
osg::Group
57
{
58
public
:
60
CdbGroupNode
(
const
CDBTileKey
& key);
62
CdbGroupNode
(
const
osg::Group& group,
const
CDBTileKey
& key,
int
dataSet);
64
virtual
~CdbGroupNode
();
66
virtual
osg::MatrixTransform*
getMTForQuadrant
(
Quadrant
q);
67
69
void
addQuadrantChild
(
Quadrant
quadrant, osg::Group* group);
71
void
setQuadrantChild
(
Quadrant
quadrant,
CdbGroupNode
* parentGroupNode);
74
bool
isFromParentQuadrant
(
Quadrant
quadrant)
const
;
76
osg::Group*
getQuadrantAttachPoint
(
Quadrant
quadrant);
78
osg::MatrixTransform*
getQuadrantMt
(
Quadrant
quadrant);
80
void
setHasCdbChildren
(
bool
hasChildren);
82
bool
getHasCdbChildren
()
const
;
84
const
CDBTileKey
&
getKey
(
void
)
const
;
86
void
setObserver
(
CdbGroupNodeObserver
* observer);
88
const
CdbGroupNodeObserver
*
getObserver
(
void
)
const
;
90
void
plusplusNumGTPoints
(
Quadrant
quadrant);
92
int
numGTPoints
(
void
)
const
;
95
osg::Group*
getOrCreateQuadrantNode
(
Quadrant
quadrant,
bool
& created);
96
protected
:
98
osg::ref_ptr<osg::MatrixTransform>
myMt
[4];
101
static
const
std::vector<std::string>
theQuadrantStrings
;
103
static
const
std::string
theEmptyString
;
105
static
const
std::string
theFromParent
;
107
static
const
std::string
theNotFromParent
;
109
static
const
std::string
theHasChild
;
111
static
const
std::string
theNoChild
;
113
CdbGroupNodeObserver
*
myObserver
;
115
CDBTileKey
myKey
;
116
private
:
117
#if DTCDGROUPNODE_DEBUG
118
static
tbb::atomic<int> myNumofCdbGroupNodes;
119
#endif
120
121
static
const
std::string&
getQuadrantChildPrefix
(
Quadrant
quadrant);
123
static
Quadrant
getQuadrantFromName
(
const
std::string& name);
125
tbb::atomic<int>
myNumGTPoints
[4];
127
Threading::Mutex
myMutex
;
128
};
129
}
130
}
131
}
// namespace makVrv::oe::CDB
Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)