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
DtTritonWaterClampingUpdater.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2016 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#pragma once
11
#include <
vrvTriton/vrvTriton.h
>
12
13
#include <
vrvCore/DtWaterClampingUpdater.h
>
14
#include <matrix/vlVector.h>
15
#include <matrix/vlTaitBryan.h>
16
#include <
vrvUtil/DtSignalConnectionManager.h
>
17
18
namespace
makVrv
19
{
20
class
DtRk4MotionModel;
21
class
DtTritonManager;
22
class
DtObserverObject;
23
29
class
DT_DLL_VRVTRITON
DtTritonWaterClampingUpdater
:
30
public
DtWaterClampingUpdater
31
{
32
33
public
:
34
36
DtTritonWaterClampingUpdater
(
DtDe
& de,
DtUniqueID
id
);
37
39
virtual
~
DtTritonWaterClampingUpdater
();
40
42
virtual
bool
clampToWater(
DtTime
tNow);
43
45
virtual
void
setPaused(
bool
isPaused);
46
48
virtual
void
setLOD(
float
lodDistance);
49
51
virtual
void
setWaterlineOriginOffset(
float
offset
);
52
54
// changes or to 'restore' a sinking ship.
55
virtual
void
resetMotionModel(
double
seaLevel );
56
57
protected
:
59
virtual
double
altitudeAt(
const
DtVector
& pos);
60
62
virtual
void
addAltitude(
DtVector
& pos,
float
altitudeToAdd );
63
65
virtual
DtVector
moveToAltitude(
const
DtVector
& pos,
double
alt);
66
71
virtual
DtTaitBryan computeMotionOrientation();
72
74
virtual
bool
isFullyImmersed();
75
76
virtual
void
adjustSinkingSpeedScale(
const
DtVector
& inputPosition,
77
const
DtVector
& currentPosition );
78
81
virtual
void
smoothMotionAndSeaLevel(
double
percent,
82
DtVector
& outputPos, DtTaitBryan &outputOri);
83
84
//handle sea level change signals
85
virtual
void
slot_oceanLayerSeaLevelChanged(
double
sealevel);
86
87
//helper method to set the water line alitude based on the offset and sealevel
88
virtual
void
updateWaterLineAltitude(
double
sealevel);
89
90
//Initialize the extents of the motion model based on the scene object
91
virtual
bool
initializeExtents(
double
sealevel);
92
93
// Using the cull type, determines if the entity should suppress its buoyancy
94
// calculation because it is out of view of any observer
95
virtual
bool
checkCull(
DtObserverObject
*
const
observer,
const
DtVector
& eyeToShip )
const
;
96
97
virtual
void
slot_coordinateSystemChanged();
98
99
protected
:
100
101
static
const
double
theMotionTimeout
;
102
static
const
double
theSmoothTime
;
103
static
const
double
theFullyLodScaler
;
104
105
DtRk4MotionModel
*
myMotionModel
;
106
DtTime
myLastTickTime
;
107
bool
myExtentsSet
;
108
bool
myIsPaused
;
109
double
myLastSinkingDiff
;
110
bool
mySmallObject
;
111
DtTritonManager
&
myTritonManager
;
112
DtVector
myLastMotionPos
;
113
DtTaitBryan
myLastMotionOri
;
114
DtVector
myLastOutputPos
;
115
DtVector
myLastAltitudeAdjustedPos
;
116
float
myWaterlineAltitude
;
117
DtVector
myLastInputPosition
;
118
DtVector
mySeaLevelPosition
;
119
bool
mySeaLevelPositionDirty
;
120
DtTime
myLastLODTickTime
;
121
float
mySeaLevelClampDistance
;
122
bool
myLodedOut
;
123
DtSignalConnectionManager
myConnections
;
124
bool
myCoordinateSystemChanged
;
125
126
};
127
}
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
)