![]() |
VR-Forces 4.10 Class Documentation
|

Public Types | |
| enum | TritonQuality { TritonQuality_Good, TritonQuality_Better, TritonQuality_Best } |
Public Member Functions | |
| virtual | ~DtTritonManager () |
| void | addToScene () |
| virtual void | oceanLayerAdded () |
| virtual void | oceanLayerToBeDeleted () |
| void | setSeaLevel (float level) |
| float | seaLevel () const |
| Returns the current sea level. More... | |
| void | setElevationLod (double maxElevation) |
| double | elevationLod () const |
| void | setWind (double speed, double direction, double fetch=0.0) |
| Set the wind effects on ocean waves. More... | |
| void | setDouglasSeaState (int seaState, double seaStateDirection, int swellState, double swellStateDirection) |
| Set the Douglas sea and swell states. More... | |
| void | addSwell (float wavelength, float waveHeight, float radiansClockwiseFromNorth) |
| void | clearSwells () |
| void | setChoppiness (float chop) |
| Set the choppiness of the waves. More... | |
| bool | getIsUnderwater (const osg::Camera *osgCamera) const |
| void | setUnderwaterVisibility (double distance) |
| bool | setUnderwaterFogColor (const DtVector &fogColor) |
| void | setUnderwaterFogEnabled (bool enabled) |
| void | setWaterColor (const DtVector &waterColor) |
| DtVector | waterColor () const |
| double | waterVisibility () const |
| void | setWaterVisibility (double distance) |
| void | setSurfaceTransparency (double transparency) |
| bool | setSurgeDepth (float depth) |
| bool | getSurgeDepth (float &depth) const |
| void | setDepthOffset (float offset) |
| bool | intersect (const DtVector &position, DtVector &positionOut, DtVector &normalOut, float waterlineAdjustment=0.0) |
| Get the intersection with a wave, assuming the position is directly above the sea (vertical) More... | |
| bool | intersectSeaLevel (const DtVector &position, const DtVector &direction, DtVector &positionOut) |
| Get an intersection of a ray starting at position and pointing in direction with the sea level plane This can potentially query the externally provided height map that triton stores internally. More... | |
| bool | getHeight (const DtVector &position, const DtVector &direction, double &height, DtVector &normalOut) |
| Get the height of the wave field intersected by a ray starting at position pointing in direction This can potentially query the externally provided height map that triton stores internally. More... | |
| Triton::WakeGenerator * | createWake (const Triton::WakeGeneratorParameters ¶meters) |
| Triton::RotorWash * | createRotorWash (double rotorDiameter) |
| Triton::Impact * | createImpact (double impactorDiameter, double mass, double sprayScale) |
| Triton::TidalStreamWake * | createTidalStreamWake (double size, double draft, double maxWaveHeight, double offset) |
| Create a wake from a fixed object such as a buoy or bridge pile, with a given wave length, draft (distance below water the object extends,) and maximum wave amplitude. More... | |
| void | setSplashEffects (bool screenSplashEnabled) |
| Toggle water splash on screen effects when submerging. More... | |
| bool | splashEffects () const |
| void | setSprayEffects (bool screenSprayEnabled) |
| Toggle water spray on screen effects when near the water. More... | |
| bool | sprayEffects () const |
| void | setWaveSprayEffects (bool waveSprayEnabled) |
| Toggle spray effects from high wave crests. More... | |
| bool | waveSprayEffects () const |
| void | setDecalEffects (bool decalsEnabled) |
| Toggle use of decal textures on rotor wash for subsquently created rotor washes. More... | |
| bool | decalEffects () const |
| void | setGodRayEffects (bool godRaysEnabled) |
| Toggles underwater "god rays" or shafts of light. More... | |
| bool | godRayEffects () const |
| void | setBreakingWaveAmplitude (float meters) |
| float | getBreakingWaveAmplitude () const |
| float | getMaximumWaveHeight () |
| Returns maximum wave height just based on the sea state. More... | |
| void | setHeightMapResolution (float metersPerTexel) |
| Get/set the meters represented by one height map texel. More... | |
| bool | getHeightMapResolution (float &metersPerTexel) const |
| void | setSeaState (unsigned int beaufortScale) |
| unsigned int | seaState () const |
| void | setBeach (const DtVector &origin, const DtVector &normal) |
| void | setPlanarReflections (bool enable) |
| bool | planarReflections () const |
| void | setHeightMap (bool enable) |
| bool | heightMap () const |
| void | setCorrelateIntersectionsToVisuals (bool visualCorrelation) |
| bool | correlateIntersectionsToVisuals () const |
| void | setOceanMaskTextureEnabled (bool enable) |
| Get/set a flag for disabling the ocean mask texture. More... | |
| bool | isOceanMaskTextureEnabled () const |
| virtual void | setQuality (unsigned int quality) |
| Set quality of wave simulation - "good" yields best performance but least detail, "best" favors quality over performance. More... | |
| virtual TritonQuality | getQuality () const |
| virtual bool | isOverWater (const DtVector &localPosition, bool isVisible=true) |
| Returns whether we are currently over water. More... | |
| bool | addedToScene () |
| void | setIsVisible (bool visible, unsigned int frameNum) |
| bool | getIsVisible () |
| DtTime | oceanTime () const |
| DtTritonDrawable * | tritonDrawable () const |
| virtual double | getOceanZoomOverride () const |
| virtual void | setOceanZoomOverride (double zoomOverride) |
Public Member Functions inherited from makVrv::DtOceanStateInterface | |
| DtOceanStateInterface (DtDe &de) | |
| CTOR. More... | |
| virtual | ~DtOceanStateInterface () |
| Virtual DTOR. More... | |
| virtual bool | getIsUnderwater () const |
| Water visibility when below water. More... | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. More... | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. More... | |
Static Public Member Functions | |
| static DtTritonManager & | instance (makVrv::DtDe &de) |
Public Attributes | |
| boost::signalslib::signal< void()> | signal_oceanInitialized |
| boost::signalslib::signal< void()> | signal_addedToScene |
| boost::signalslib::signal< void()> | signal_removedFromScene |
| boost::signalslib::signal< void()> | signal_oceanToBeDestroyed |
| boost::signalslib::signal < void(double)> | signal_shipSpeedChanged |
Protected Member Functions | |
| DtTritonManager (makVrv::DtDe &de) | |
| void | slot_postInitialize () |
| void | slot_driverToBeDestroyed (DtDriver &driver) |
| DtDynamicOceanObject * | dynamicOcean () const |
| Helper function to get the dynamic ocean. More... | |
|
virtual |
|
protected |
|
static |
| void makVrv::DtTritonManager::addToScene | ( | ) |
|
virtual |
|
virtual |
| void makVrv::DtTritonManager::setSeaLevel | ( | float | level | ) |
|
virtual |
Returns the current sea level.
Reimplemented from makVrv::DtOceanStateInterface.
| void makVrv::DtTritonManager::setElevationLod | ( | double | maxElevation | ) |
| double makVrv::DtTritonManager::elevationLod | ( | ) | const |
Set the wind effects on ocean waves.
| [in] | speed | is in meters per second. |
| [in] | direction | is in radians clockwise from north. |
| [in] | fetch | is fetch distance in meters. |
| void makVrv::DtTritonManager::setDouglasSeaState | ( | int | seaState, |
| double | seaStateDirection, | ||
| int | swellState, | ||
| double | swellStateDirection | ||
| ) |
Set the Douglas sea and swell states.
| [in] | seaState | is the sea-state generated by local winds (0 - 9). |
| [in] | seaStateDirection | is the direction of the sea-state. |
| [in] | swellState | is the swell-state generated afar (0 - 9). |
| [in] | swellStateDirection | is the direction of the swells. |
| void makVrv::DtTritonManager::addSwell | ( | float | wavelength, |
| float | waveHeight, | ||
| float | radiansClockwiseFromNorth | ||
| ) |
| void makVrv::DtTritonManager::clearSwells | ( | ) |
| void makVrv::DtTritonManager::setChoppiness | ( | float | chop | ) |
Set the choppiness of the waves.
| [in] | chop | is a normalized value from 0.0 to 1.0. |
| bool makVrv::DtTritonManager::getIsUnderwater | ( | const osg::Camera * | osgCamera | ) | const |
| void makVrv::DtTritonManager::setUnderwaterVisibility | ( | double | distance | ) |
| void makVrv::DtTritonManager::setUnderwaterFogEnabled | ( | bool | enabled | ) |
| void makVrv::DtTritonManager::setWaterColor | ( | const DtVector & | waterColor | ) |
| DtVector makVrv::DtTritonManager::waterColor | ( | ) | const |
| double makVrv::DtTritonManager::waterVisibility | ( | ) | const |
| void makVrv::DtTritonManager::setWaterVisibility | ( | double | distance | ) |
| void makVrv::DtTritonManager::setSurfaceTransparency | ( | double | transparency | ) |
| bool makVrv::DtTritonManager::setSurgeDepth | ( | float | depth | ) |
| bool makVrv::DtTritonManager::getSurgeDepth | ( | float & | depth | ) | const |
| void makVrv::DtTritonManager::setDepthOffset | ( | float | offset | ) |
| bool makVrv::DtTritonManager::intersect | ( | const DtVector & | position, |
| DtVector & | positionOut, | ||
| DtVector & | normalOut, | ||
| float | waterlineAdjustment = 0.0 |
||
| ) |
Get the intersection with a wave, assuming the position is directly above the sea (vertical)
| bool makVrv::DtTritonManager::intersectSeaLevel | ( | const DtVector & | position, |
| const DtVector & | direction, | ||
| DtVector & | positionOut | ||
| ) |
Get an intersection of a ray starting at position and pointing in direction with the sea level plane This can potentially query the externally provided height map that triton stores internally.
If so, this must be called where the OpenGL context is current.
| bool makVrv::DtTritonManager::getHeight | ( | const DtVector & | position, |
| const DtVector & | direction, | ||
| double & | height, | ||
| DtVector & | normalOut | ||
| ) |
Get the height of the wave field intersected by a ray starting at position pointing in direction This can potentially query the externally provided height map that triton stores internally.
If so, this must be called where the OpenGL context is current.
| Triton::WakeGenerator* makVrv::DtTritonManager::createWake | ( | const Triton::WakeGeneratorParameters & | parameters | ) |
| Triton::RotorWash* makVrv::DtTritonManager::createRotorWash | ( | double | rotorDiameter | ) |
| Triton::Impact* makVrv::DtTritonManager::createImpact | ( | double | impactorDiameter, |
| double | mass, | ||
| double | sprayScale | ||
| ) |
| Triton::TidalStreamWake* makVrv::DtTritonManager::createTidalStreamWake | ( | double | size, |
| double | draft, | ||
| double | maxWaveHeight, | ||
| double | offset | ||
| ) |
Create a wake from a fixed object such as a buoy or bridge pile, with a given wave length, draft (distance below water the object extends,) and maximum wave amplitude.
Call Update() on this object each frame to activate it for a given position, direction, and tidal stream velocity.
| void makVrv::DtTritonManager::setSplashEffects | ( | bool | screenSplashEnabled | ) |
Toggle water splash on screen effects when submerging.
| bool makVrv::DtTritonManager::splashEffects | ( | ) | const |
| void makVrv::DtTritonManager::setSprayEffects | ( | bool | screenSprayEnabled | ) |
Toggle water spray on screen effects when near the water.
| bool makVrv::DtTritonManager::sprayEffects | ( | ) | const |
| void makVrv::DtTritonManager::setWaveSprayEffects | ( | bool | waveSprayEnabled | ) |
Toggle spray effects from high wave crests.
| bool makVrv::DtTritonManager::waveSprayEffects | ( | ) | const |
| void makVrv::DtTritonManager::setDecalEffects | ( | bool | decalsEnabled | ) |
Toggle use of decal textures on rotor wash for subsquently created rotor washes.
| bool makVrv::DtTritonManager::decalEffects | ( | ) | const |
| void makVrv::DtTritonManager::setGodRayEffects | ( | bool | godRaysEnabled | ) |
Toggles underwater "god rays" or shafts of light.
| bool makVrv::DtTritonManager::godRayEffects | ( | ) | const |
| void makVrv::DtTritonManager::setBreakingWaveAmplitude | ( | float | meters | ) |
| float makVrv::DtTritonManager::getBreakingWaveAmplitude | ( | ) | const |
|
virtual |
Returns maximum wave height just based on the sea state.
Reimplemented from makVrv::DtOceanStateInterface.
| void makVrv::DtTritonManager::setHeightMapResolution | ( | float | metersPerTexel | ) |
Get/set the meters represented by one height map texel.
| bool makVrv::DtTritonManager::getHeightMapResolution | ( | float & | metersPerTexel | ) | const |
| void makVrv::DtTritonManager::setPlanarReflections | ( | bool | enable | ) |
| bool makVrv::DtTritonManager::planarReflections | ( | ) | const |
| void makVrv::DtTritonManager::setHeightMap | ( | bool | enable | ) |
| bool makVrv::DtTritonManager::heightMap | ( | ) | const |
| void makVrv::DtTritonManager::setCorrelateIntersectionsToVisuals | ( | bool | visualCorrelation | ) |
| bool makVrv::DtTritonManager::correlateIntersectionsToVisuals | ( | ) | const |
| void makVrv::DtTritonManager::setOceanMaskTextureEnabled | ( | bool | enable | ) |
Get/set a flag for disabling the ocean mask texture.
This is used by the SOE since it doesn't need a mask and it is crashing on Centos8
| bool makVrv::DtTritonManager::isOceanMaskTextureEnabled | ( | ) | const |
Set quality of wave simulation - "good" yields best performance but least detail, "best" favors quality over performance.
Default is good.
|
virtual |
|
virtual |
Returns whether we are currently over water.
This can't be implemented correctly until we have coastal boundaries. For now, we use a call to Triton::Ocean->GetIntersection() if isVisible is true; this only works if there is a valid height map in the area of the query, which means it will only work correctly if there is a camera (observer) in the query area; it really should only be used for things that are LOD'd out when not close to an observer; things like wakes on amphibious vehicles, tidal stream wakes, or rotor wash. We use the returned height of a terrain intersect call if isVisible is false; sea level or below is water, anything higher is not.
Reimplemented from makVrv::DtOceanStateInterface.
| bool makVrv::DtTritonManager::addedToScene | ( | ) |
| bool makVrv::DtTritonManager::getIsVisible | ( | ) |
| DtTime makVrv::DtTritonManager::oceanTime | ( | ) | const |
| DtTritonDrawable* makVrv::DtTritonManager::tritonDrawable | ( | ) | const |
|
virtual |
|
virtual |
|
protected |
|
protected |
|
protected |
Helper function to get the dynamic ocean.
| boost::signalslib::signal<void ()> makVrv::DtTritonManager::signal_oceanInitialized |
| boost::signalslib::signal<void()> makVrv::DtTritonManager::signal_addedToScene |
| boost::signalslib::signal<void()> makVrv::DtTritonManager::signal_removedFromScene |
| boost::signalslib::signal<void()> makVrv::DtTritonManager::signal_oceanToBeDestroyed |
| boost::signalslib::signal<void (double)> makVrv::DtTritonManager::signal_shipSpeedChanged |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |