VR-Vantage 2.5 API Documentation
Home
Modules
Namespaces
Classes
Files
Libraries
Examples
Tutorials
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vrvCore
DtChannel.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2018 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#pragma once
11
12
#include <
vrvCore/vrvCore.h
>
13
#include <
vrvUtil/DtSignalConnectionManager.h
>
14
#include <
vrvUtil/DtVirtualBaseClass.h
>
15
#include <
vrvUtil/DtChannelConfiguration.h
>
16
#include <boost/signals.hpp>
17
18
namespace
makVrv
19
{
20
class
DtDe;
21
class
DtWindow;
22
class
DtObserverObject;
23
class
DtMouseEvent;
24
class
DtKeyEvent;
25
class
DtSensor;
26
29
class
DT_DLL_VRVCORE
DtChannel
30
{
31
32
protected
:
34
DtChannel
(
DtDe
& de,
DtChannelConfiguration
&);
35
36
public
:
37
39
virtual
~
DtChannel
();
40
42
DtObserverObject
* findObserver()
const
;
43
45
unsigned
int
currentModelSet()
const
;
46
48
virtual
void
setClearColor(
float
r
,
float
g
,
float
b
,
float
a
) = 0;
49
51
virtual
void
setViewport(
int
x
,
int
y
,
int
width
,
int
height
) = 0;
52
54
virtual
void
getViewport(
int
& x,
int
& y,
int
& width,
int
& height)
const
= 0;
55
57
virtual
void
setWindow(
DtWindow
*) = 0;
58
60
virtual
void
setCameraPosition(
double
x,
double
y,
double
z
) = 0;
61
63
virtual
const
DtWindow
* window()
const
= 0;
64
66
virtual
void
update() = 0;
67
69
const
DtChannelConfiguration
& configuration()
const
;
70
73
virtual
void
updateProjection() = 0;
74
76
virtual
void
setObserverName(
const
std::string
& observerName );
77
82
virtual
void
setSensorName(
const
std::string
& sensorName ) = 0;
83
86
virtual
void
setProjectionResizePolicy(
87
DtChannelConfiguration::ProjectionResizePolicy
policy);
88
91
virtual
DtChannelConfiguration::ProjectionResizePolicy
92
projectionResizePolicy()
const
;
93
95
virtual
bool
processMouseEvent(
const
DtMouseEvent
& ev) = 0;
96
98
virtual
bool
processKeyboardEvent(
const
DtKeyEvent
& ev) = 0;
99
102
virtual
void
projectToScreen(
double
dbX,
double
dbY,
double
dbZ,
103
double
& screenX,
double
& screenY,
double
& screenZ ) = 0;
104
106
virtual
void
projectToWorld(
double
screenX,
double
screenY,
107
double
& dbX,
double
& dbY,
double
& dbZ ) = 0;
108
110
virtual
void
moveMouseToScreenLocation(
float
pixelX,
float
pixelY ) = 0;
111
113
std::string
& observerName();
114
116
virtual
void
screenCapture() = 0;
117
118
protected
:
119
virtual
void
connectToObserver() = 0;
120
122
virtual
void
observerAdded(
const
std::string
& observerName );
124
virtual
void
observerRemoved(
const
std::string
& observerName );
125
126
protected
:
127
128
DtDe
&
myDe
;
129
DtChannelConfiguration
&
myChannelConfiguration
;
130
DtSignalConnectionManager
myConnections
;
131
132
int
myModelSet
;
133
DtObserverObject
*
myObserver
;
134
std::string
myObserverName
;
135
DtChannelConfiguration::ProjectionResizePolicy
myProjectionResizePolicy
;
136
};
137
142
class
DT_DLL_VRVCORE
DtChannelCreator
:
public
DtVirtualBaseClass
143
{
144
145
public
:
148
static
DtChannelCreator
& instance(
DtDe
& theIG);
149
151
static
void
registerInstance(
DtDe
& de,
DtChannelCreator
* instance);
152
154
virtual
DtChannel
* create(
DtDe
& de,
DtWindow
* window,
155
DtChannelConfiguration
&) = 0;
156
};
157
}
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)