![]() |
VR-Forces 4.6 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. | |
| void | setElevationLod (double maxElevation) |
| double | elevationLod () const |
| void | setWind (double speed, double direction, double fetch=0.0) |
| Set the wind effects on ocean waves. | |
| void | setDouglasSeaState (int seaState, double seaStateDirection, int swellState, double swellStateDirection) |
| Set the Douglas sea and swell states. | |
| void | addSwell (float wavelength, float waveHeight, float radiansClockwiseFromNorth) |
| void | clearSwells () |
| void | setChoppiness (float chop) |
| Set the choppiness of the waves. | |
| bool | getIsUnderwater () const |
| Water visibility when below water. | |
| 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) | |
| 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. | |
| 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. | |
| 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. | |
| void | setSplashEffects (bool screenSplashEnabled) |
| Toggle water splash on screen effects when submerging. | |
| bool | splashEffects () const |
| void | setSprayEffects (bool screenSprayEnabled) |
| Toggle water spray on screen effects when near the water. | |
| bool | sprayEffects () const |
| void | setWaveSprayEffects (bool waveSprayEnabled) |
| Toggle spray effects from high wave crests. | |
| bool | waveSprayEffects () const |
| void | setDecalEffects (bool decalsEnabled) |
| Toggle use of decal textures on rotor wash for subsquently created rotor washes. | |
| bool | decalEffects () const |
| void | setGodRayEffects (bool godRaysEnabled) |
| Toggles underwater "god rays" or shafts of light. | |
| bool | godRayEffects () const |
| void | setBreakingWaveAmplitude (float meters) |
| float | getBreakingWaveAmplitude () const |
| float | getMaximumWaveHeight () |
| Returns maximum wave height just based on the sea state. | |
| void | setHeightMapResolution (float metersPerTexel) |
| Get/set the meters represented by one height map texel. | |
| 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 | setWaveDampingDistance (float distance) |
| float | waveDampingDistance () const |
| void | setCorrelateIntersectionsToVisuals (bool visualCorrelation) |
| bool | correlateIntersectionsToVisuals () const |
| virtual void | setQuality (unsigned int quality) |
| Set quality of wave simulation - "good" yields best performance but least detail, "best" favors quality over performance. | |
| virtual TritonQuality | getQuality () const |
| virtual bool | isOverWater (const DtVector &localPosition, bool isVisible=true) |
| Returns whether we are currently over water. | |
| 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. | |
| virtual | ~DtOceanStateInterface () |
| Virtual DTOR. | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. | |
Static Public Member Functions | |
| static DtTritonManager & | instance (makVrv::DtDe &de) |
Public Attributes | |
| boost::signal< void()> | signal_oceanInitialized |
| boost::signal< void()> | signal_addedToScene |
| boost::signal< void()> | signal_removedFromScene |
| boost::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. | |
Protected Attributes | |
| DtSignalConnectionManager | mySignals |
| DtTritonEventProcessor * | myEventProcessor |
| osg::ref_ptr< DtTritonDrawable > | myTritonDrawable |
| osg::ref_ptr< DtTritonGroup > | myTritonRoot |
| float | myElevationRange |
| float | mySeaLevel |
| double | myWaterVisibility |
| bool | myVisualIntersections |
| float | myWaveDampingDistance |
| unsigned int | myLastFrameNum |
| bool | myWaterVisible |
| bool | myDecalEffects |
| DtVector | myWaterColor |
| double | myOceanZoomOverride |
| DtDynamicOceanObjectManager & | myDynamicOceanObjectManager |
| DtTritonManager::TritonQuality | myTritonQuality |
Protected Attributes inherited from makVrv::DtOceanStateInterface | |
| DtDe & | myDe |
|
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. |
|
virtual |
Water visibility when below water.
Reimplemented from makVrv::DtOceanStateInterface.
| 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.
| 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.
| 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::setWaveDampingDistance | ( | float | distance | ) |
| float makVrv::DtTritonManager::waveDampingDistance | ( | ) | const |
| void makVrv::DtTritonManager::setCorrelateIntersectionsToVisuals | ( | bool | visualCorrelation | ) |
| bool makVrv::DtTritonManager::correlateIntersectionsToVisuals | ( | ) | 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::signal<void ()> makVrv::DtTritonManager::signal_oceanInitialized |
| boost::signal<void()> makVrv::DtTritonManager::signal_addedToScene |
| boost::signal<void()> makVrv::DtTritonManager::signal_removedFromScene |
| boost::signal<void (double)> makVrv::DtTritonManager::signal_shipSpeedChanged |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |