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
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
53
protected
:
55
virtual
double
altitudeAt(
const
DtVector
& pos);
56
58
virtual
void
addAltitude(
DtVector
& pos,
float
altitudeToAdd );
59
61
virtual
DtVector
moveToAltitude(
const
DtVector
& pos,
double
alt);
62
67
virtual
DtTaitBryan computeMotionOrientation();
68
70
virtual
bool
isFullyImmersed();
71
72
virtual
void
adjustSinkingSpeedScale(
const
DtVector
& inputPosition,
73
const
DtVector
& currentPosition );
74
77
virtual
void
smoothMotionAndSeaLevel(
double
percent,
78
DtVector
& outputPos, DtTaitBryan &outputOri);
79
80
//handle sea level change signals
81
virtual
void
slot_oceanLayerSeaLevelChanged(
double
sealevel);
82
83
//helper method to set the water line alitude based on the offset and sealevel
84
virtual
void
updateWaterLineAltitude(
double
sealevel);
85
86
//Initialize the extents of the motion model based on the scene object
87
virtual
bool
initializeExtents(
double
sealevel);
88
89
// Using the cull type, determines if the entity should suppress its buoyancy
90
// calculation because it is out of view of any observer
91
virtual
bool
checkCull(
DtObserverObject
*
const
observer,
const
DtVector
& eyeToShip )
const
;
92
93
protected
:
94
95
static
const
double
theMotionTimeout
;
96
static
const
double
theSmoothTime
;
97
static
const
double
theFullyLodScaler
;
98
99
DtRk4MotionModel
*
myMotionModel
;
100
DtTime
myLastTickTime
;
101
bool
myExtentsSet
;
102
bool
myIsPaused
;
103
double
myLastSinkingDiff
;
104
bool
mySmallObject
;
105
DtTritonManager
&
myTritonManager
;
106
DtVector
myLastMotionPos
;
107
DtTaitBryan
myLastMotionOri
;
108
DtVector
myLastOutputPos
;
109
DtVector
myLastAltitudeAdjustedPos
;
110
float
myWaterlineAltitude
;
111
DtVector
myLastInputPosition
;
112
DtVector
mySeaLevelPosition
;
113
bool
mySeaLevelPositionDirty
;
114
DtTime
myLastLODTickTime
;
115
float
mySeaLevelClampDistance
;
116
DtSignalConnectionManager
myConnections
;
117
118
};
119
}
Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)