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
vrfGuiCore
mapScaleInstance.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* Copyright (c) 2018 MAK Technologies, Inc.
3
* All rights reserved.
4
*****************************************************************************/
5
6
#pragma once
7
8
#include <
vrfGuiCore/vrfGuiCore.h
>
9
#include <
vrvUtil/DtVirtualBaseClass.h
>
10
11
#include <
vrvGraphics/DtFont.h
>
12
#include <
vrvGraphics/DtFontManager.h
>
13
14
#include <
vrvUtil/DtSignalConnectionManager.h
>
15
16
#include <matrix/vlVector.h>
17
18
#include <osg/Quat>
19
20
namespace
makVrv
21
{
22
23
class
DtDe;
24
class
DtChannel;
25
class
DtChannelConfiguration;
26
class
DtChannelManager;
27
class
DtOsgChannel;
28
class
DtOverlayRenderer;
29
class
DtWindowConfiguration;
30
class
DtLineSegment;
31
class
DtTextProxy;
32
}
33
34
namespace
makVrf
35
{
36
class
DtGuiEventProcessor;
37
40
class
DT_DLL_VRFGUICORE
DtMapScaleInstance
41
{
42
public
:
43
45
DtMapScaleInstance
(
makVrv::DtDe
& de);
46
48
virtual
~
DtMapScaleInstance
();
49
51
virtual
void
setChannelName(
const
std::string& deName,
52
const
std::string& winName,
const
std::string& channelName );
53
56
virtual
void
setModelDefinition(
const
std::string& modelDefinition );
57
59
virtual
void
setVisible(
bool
isVisible);
60
61
bool
visible()
const
62
{
63
return
myVisible;
64
}
65
66
protected
:
67
69
virtual
void
slot_channelCreated(
makVrv::DtChannelManager
*,
makVrv::DtChannel
*);
70
72
virtual
void
slot_channelToBeDestroyed(
makVrv::DtChannelManager
*,
makVrv::DtChannel
*);
73
75
void
slot_channelUpdated(
makVrv::DtChannelManager
*,
makVrv::DtChannel
* );
76
77
virtual
void
setChannel(
makVrv::DtChannel
*);
78
79
virtual
void
updateMapScale();
80
81
virtual
void
destroyVisuals();
82
virtual
void
createVisuals();
83
virtual
void
setupFont();
84
86
virtual
double
findDistanceFromResolution(
double
viewResolution,
makVrv::DtUnicode
& label)
const
;
87
virtual
DtGuiEventProcessor
& guiEventProcessor()
const
;
88
92
virtual
void
slot_onUnitChanged(
int
attribute,
int
from,
int
old);
93
95
virtual
double
roundToMeter(
double
metersDistance,
makVrv::DtUnicode
& label,
bool
changeToKm =
true
)
const
;
96
99
virtual
double
roundToFeet(
double
metersDistance,
makVrv::DtUnicode
& label)
const
;
100
103
virtual
double
roundToNauticalMiles(
double
metersDistance,
makVrv::DtUnicode
& label)
const
;
104
105
private
:
106
108
DtMapScaleInstance
(
const
DtMapScaleInstance
& orig );
109
111
DtMapScaleInstance
&operator=(
const
DtMapScaleInstance
& rhs );
112
113
protected
:
114
115
makVrv::DtDe
&
myDe
;
116
makVrv::DtSignalConnectionManager
myConnections
;
117
118
makVrv::DtOsgChannel
*
myChannel
;
119
makVrv::DtOverlayRenderer
*
myOverlayRenderer
;
120
121
std::string
myModelDefinitionName
;
122
std::string
myDisplayEngineName
;
123
std::string
myWindowName
;
124
std::string
myChannelName
;
125
bool
myVisible
;
126
127
bool
myFirstFrame
;
128
double
myPreviousViewResolution
;
129
double
myPreviousWindowHeight
;
130
double
myPreviousWindowWidth
;
131
double
myPreviousViewportLeft
;
132
double
myPreviousViewportRight
;
133
double
myPreviousViewportTop
;
134
double
myPreviousViewportBottom
;
135
bool
myParamsChanged
;
136
137
makVrv::DtLineSegment
*
myHorizontalLine
;
138
makVrv::DtLineSegment
*
myLeftEdge
;
139
makVrv::DtLineSegment
*
myRightEdge
;
140
makVrv::DtTextProxy
*
myScaleText
;
141
makVrv::DtFontSP
myFont
;
142
143
std::string
myLabelFont
;
144
int
myLabelPointSize
;
145
int
myLabelTextWidth
;
146
int
myLabelTextHeight
;
147
int
myBottomOffset
;
148
149
mutable
DtGuiEventProcessor
*
myGuiEventProcessor
;
150
};
151
152
class
DT_DLL_VRFGUICORE
DtMapScaleInstanceCreator
:
public
makVrv::DtVirtualBaseClass
153
{
154
public
:
155
DtMapScaleInstanceCreator
(
makVrv::DtDe
& de);
156
virtual
~
DtMapScaleInstanceCreator
();
157
159
static
DtMapScaleInstanceCreator
& instance(
makVrv::DtDe
& de);
160
static
void
registerInstance(
makVrv::DtDe
&,
DtMapScaleInstanceCreator
*);
161
162
virtual
DtMapScaleInstance
* create();
163
164
protected
:
165
makVrv::DtDe
&
myDe
;
166
};
167
}
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
)