VR-Forces Development_Version 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::Vec3
myLastHeightUpdatePos
;
79
unsigned
int
myHeightUpdateFrame
;
80
bool
myHeightCameraAttached
;
81
bool
myForceUpdate
;
82
float
myResolution
;
83
bool
mySavedPerfOverlayOn
;
84
double
myLastUpdateTime
;
85
86
osg::ref_ptr<osg::Texture2D>
myHeightMap
,
myDepthTexture
;
87
osg::Matrix
myHeightMapMatrix
;
88
int
myHeightMapDimension
;
89
osg::ref_ptr<osg::Camera>
myHeightCamera
;
90
91
makVrv::DtDe
&
myDe
;
92
93
DtTritonDrawable
*
myDrawable
;
94
95
DtSignalConnectionManager
myConnections
;
96
};
97
}
Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)