VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
14 #include <matrix/vlVector.h>
15 #include <matrix/vlTaitBryan.h>
17 
18 namespace makVrv
19 {
20  class DtRk4MotionModel;
21  class DtTritonManager;
22  class DtObserverObject;
23 
31  {
32 
33  public:
34 
37 
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 
113  DtTaitBryan myLastMotionOri;
125 
126  };
127 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)