VR-Forces 4.5 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vrvTriton
DtTritonHeightMapManager.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2013 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#pragma once
11
12
#include <osg/Camera>
13
#include <osg/Drawable>
14
#include <osg/Texture2D>
15
16
#include <
vrvUtil/DtSignalConnectionManager.h
>
17
18
namespace
makVrv
19
{
20
class
DtTritonDrawable;
21
class
DtDe;
22
25
class
DtTritonHeightMapManager
26
{
27
public
:
28
DtTritonHeightMapManager
(
makVrv::DtDe
& de,
DtTritonDrawable
*parentDrawable);
29
30
virtual
~DtTritonHeightMapManager
();
31
33
void
setupHeightMap
(
void
);
34
36
void
setHeightMapResolution
(
float
resolution);
37
39
float
getHeightMapResolution
()
const
;
40
43
void
setHeightMapTextureSize
(
int
pixels);
44
46
int
heightMapTextureSize
()
const
;
47
50
bool
updateHeightCamera
(
unsigned
int
frameNum,
51
const
osg::Vec3& currentPosition,
bool
isGeocentric );
52
54
void
setHeightCameraAttachment
(
bool
enabled);
55
57
const
osg::Matrix&
getHeightMapMatrix
()
58
{
59
return
myHeightMapMatrix
;
60
}
61
63
const
osg::ref_ptr<osg::Texture2D>
getHeightMapTexture
()
64
{
65
return
myHeightMap
;
66
}
67
69
void
forceUpdate
()
70
{
71
myForceUpdate
=
true
;
72
}
73
74
protected
:
75
76
void
cleanup
( );
77
78
osg::Matrixd
oglRevDepthOrtho
(
double
left,
double
right,
79
double
bottom,
double
top,
80
double
zNear,
double
zFar);
81
82
osg::Vec3
myLastHeightUpdatePos
;
83
unsigned
int
myHeightUpdateFrame
;
84
bool
myHeightCameraAttached
;
85
bool
myForceUpdate
;
86
float
myResolution
;
87
bool
mySavedPerfOverlayOn
;
88
double
myLastUpdateTime
;
89
90
osg::ref_ptr<osg::Texture2D>
myHeightMap
,
myDepthTexture
;
91
osg::Matrix
myHeightMapMatrix
;
92
int
myHeightMapDimension
;
93
osg::ref_ptr<osg::Camera>
myHeightCamera
;
94
95
makVrv::DtDe
&
myDe
;
96
97
DtTritonDrawable
*
myDrawable
;
98
99
DtSignalConnectionManager
myConnections
;
100
};
101
}
Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (
www.mak.com
)