VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
makVrv::DtTritonDrawable Class Reference

An OSG Drawable representing Triton's infinite ocean. More...

Inheritance diagram for makVrv::DtTritonDrawable:
Inheritance graph
[legend]

Public Member Functions

 DtTritonDrawable (makVrv::DtDe &de, const DtTritonManager &tritonManager, DtEnvironmentInfo &environmentInfo, bool geocentric, osg::TextureCubeMap *environmentMap=NULL, DtTritonManager::TritonQuality tritonQuality=DtTritonManager::TritonQuality_Good)
 CTOR. More...
 
virtual bool isSameKindAs (const Object *obj) const
 osg overridden functions for creating a derived class More...
 
virtual Object * cloneType () const
 osg overridden functions for creating a derived class More...
 
virtual Object * clone (const osg::CopyOp &copyop) const
 osg overridden functions for creating a derived class More...
 
virtual Triton::Oceanocean ()
 Return the underlying Triton::Ocean object. More...
 
virtual const Triton::Camera * closestCameraTo (const DtVector &position) const
 Closest triton camera, to the point in question. More...
 
virtual Triton::Environment * environment ()
 Return the underlying Triton::Environment object. More...
 
virtual const Triton::Camera * tritonCamera (const osg::Camera *osgCamera) const
 The triton camera corresponding to osg camera. More...
 
virtual void setBeach (const osg::Vec3 &beachOrigin, const osg::Vec3 &normal)
 Pass info to Triton about the local ocean depth and floor slope. More...
 
virtual void syncHeightMapToGpu (DtHeightMapManager *heightMapMgr, const osg::State *state, const osg::Camera *camera)
 sends the height map to the gpu . More...
 
virtual void drawImplementation (osg::RenderInfo &renderInfo) const
 Perform drawing of the Ocean from the render thread. More...
 
virtual void setPlanarReflectionsEnabled (bool enabled)
 Toggle use of planar reflections of local objects. More...
 
virtual bool planarReflectionsFlag () const
 
virtual void setMaxReflectionWindSpeed (double metersPerSecond)
 Set the wind speed at which we blend out planar reflections (default 20 m/s) More...
 
virtual bool isInitialized () const
 Whether Triton has been fully initialized (after its first frame.) More...
 
virtual void setAllowUnderwaterEffects (bool allow)
 Whether underwater fog etc. More...
 
virtual bool allowUnderwaterEffects () const
 Whether underwater fog is enabled. More...
 
virtual void enableReflections (bool enabled)
 Temporarily enable or disable the planar reflection camera(s). More...
 
virtual void releaseGLObjects (osg::State *state=0) const
 Destroy the openGL objects. More...
 
virtual void setHeightMapChanged ()
 Notify the drawable of an updated height map. More...
 
virtual void setBreakingWavesMapChanged ()
 Notify the drawable of an updated breaking waves map. More...
 
virtual osg::ref_ptr
< DtPlanarReflection
getPlanarReflection (osg::Camera *camera)
 accessor for the DtPlanarReflection object for a camera. More...
 
virtual DtHeightMapManagergetOrCreateHeightMapManager (osg::RenderInfo &renderInfo)
 get or create the height map manager for the current camera based on the renderInfo More...
 
virtual
DtTritonBreakingWavesMapManager
getOrCreateBreakingWavesMapManager (osg::RenderInfo &renderInfo)
 get or create the breaking waves map manager for the current camera based on the renderInfo More...
 
virtual void setWindSpeed (double windSpeed)
 set the current wind speed to use More...
 
virtual bool geocentricFlag ()
 get whether or not the ocean is using the geocentric coordinate sysetem or not More...
 
virtual void setOceanMaskTextureEnabled (bool myOceanMaskTextureEnabled)
 set/get whether or not to enable the ocean mask used by DtTritonManager. More...
 
virtual bool isOceanMaskTextureEnabled () const
 
virtual const
DtTritonRenderingParameters
renderingParameters (void) const
 get the rendering parameters (const) More...
 
virtual
DtTritonRenderingParameters
renderingParameters (void)
 get the rendering parameters (cnon-const) More...
 
virtual void setBreakingWaveAmplitude (float meters)
 Set/get height of breaking waves at shorelines. Set to 0 to disable. More...
 
virtual float getBreakingWaveAmplitude () const
 
virtual void setHeightMap (bool enabled)
 Toggle use of automatically generated height maps for coastal effects Only enable if you have bathymetry and no sea-level ocean polygons in the database! More...
 
virtual bool heightMap () const
 
virtual void setQuality (DtTritonManager::TritonQuality quality)
 Set quality of wave simulation - "good" yields best performance but least detail, "best" favors quality over performance. More...
 
virtual
DtTritonManager::TritonQuality 
getQuality () const
 
virtual void setBreakingWavesMap (bool enabled)
 Toggle use of shapefile-based breaking wave areas and directions If off, breaking waves will be everywhere and direction determined from bathymetry. More...
 
virtual bool breakingWavesMap () const
 
virtual void setUnderwaterFogColor (const osg::Vec4 &color)
 Set/get the base (unlit) fog color when underwater. More...
 
virtual const osg::Vec4 & underwaterFogColor () const
 
virtual void setUnderwaterVisibility (double visibility)
 Set/get the visibility when underwater. More...
 
virtual double underwaterVisibility () const
 
virtual void setWaterVisibility (double visibility)
 The visibility of the water when viewed from above (affects the transparency) More...
 
virtual double waterVisibility () const
 
virtual void setSurgeDepth (float depth)
 The depth at which we start dampening wave displacement. More...
 
virtual float surgeDepth () const
 
virtual void setHeightMapResolution (float metersPerTexel)
 Get/set the resolution of the height map for shallow water effects (meters per texel) More...
 
virtual float heightMapResolution () const
 
virtual void setBreakingWavesMapResolution (float metersPerTexel)
 Get/set the resolution of the breaking waves direction map (meters per texel) More...
 
virtual float breakingWavesMapResolution () const
 
virtual osg::Group * getTritonGeode ()
 accessor for the triton geode object More...
 
virtual const osg::Group * getTritonGeode () const
 

Public Attributes

boost::signalslib::signal< void()> signal_postInitialize
 Emitted when Triton has been initialized. More...
 

Protected Types

typedef std::map
< osg::GraphicsContext *, void * > 
ContextToHandleMap
 

Protected Member Functions

virtual ~DtTritonDrawable ()
 Destructor. More...
 
virtual void shaderUpdateLightUniforms (osg::RenderInfo &info, void *context, Triton::Camera *camera) const
 update the light uniforms for a particular shader More...
 
virtual void updateImguiAndConstantsOffOfImgui ()
 setup the IMGui and read back any information from ImGui widgets More...
 
virtual void updateImguiHeightMapDebugOverlay (bool needUpdate, osg::RenderInfo &renderInfo)
 create the height map debug overlay More...
 
virtual bool setup (osg::RenderInfo &renderInfo)
 setup the triton drawable based on the render info called the first time the ocean is rendered or if the shaders are regenerated. More...
 
virtual void cleanup (void)
 called by the destructor or releaseGL objects to cleanup this drawable's state More...
 
virtual void removePlanarReflections ()
 tell the planar reflection manager to cleanup all its reflections More...
 
virtual void slot_reloadShader ()
 connected to the shared state reload shader signal in order to clean up the triton shaders More...
 
virtual void initShaderUniformHandles (void *context, Triton::Camera *camera) const
 initialize the uniform handles for the current context More...
 
virtual void applyLighting (osg::RenderInfo &info, void *context, Triton::Camera *camera) const
 setup and apply the lighting for this frame More...
 
virtual void applyQuality () const
 update the drawable to use the current quality setting for the triton ocean More...
 
virtual void setUpNearFarIfNecessary (void) const
 update clip planes if needed(e.g. if reverse z changed somehow) More...
 
virtual void updateShader (osg::Node *node, osg::State &state, void *context, Triton::Camera *camera) const
 called every time the drawable renders to check if the shader state has changed and if so it updates the shaders More...
 
virtual void slot_heightMapChanged (DtHeightMapManager &manager)
 Handles the signal for when a height map changes. More...
 
virtual void slot_heightMapCameraChanged ()
 Handles the signal for when an associated height map camera changes. More...
 
virtual void flushInvalidCameras ()
 check if the osg::Camera still is valid. If not then destroy the corrisponding triton camera More...
 
virtual void onPostTick (void)
 connected to the post tick signal and is used to call the triton ocean's post draw function More...
 
virtual void prepEnvironmentMap (const DtOsgSkyObject *skyObject, const osg::Camera *camera, const osg::State &state) const
 setup the environment map by getting it from the sky object More...
 
virtual void prepHeightMapAndBreakingWavesMaps (DtHeightMapManager *heightMapMgr, DtTritonBreakingWavesMapManager *breakingWavesMapMgr, const osg::State &state, osg::RenderInfo &renderInfo) const
 utility function for setting up the height map and breaking wave maps for rendering. More...
 
virtual void prepReflectionMap (osg::ref_ptr< DtPlanarReflection > planarReflectionCamera, const osg::State &state) const
 utility function for setting up the reflection map for rendering. More...
 
virtual void setupTritonLightFogVisibility (const osg::Camera *camera, DtOsgSkyObject *skyObject, bool isAboveWater, bool skyEnabled) const
 calculate the current fog value based on if the camera is under the water or not More...
 
virtual void setUpTritonParticlesAdditiveBlend (void) const
 sets up the particle blend setting in triton based on if HDR is on or off More...
 
virtual void setUpGodRaysFading (const DtOsgCullVisitorParameters *params) const
 sets up the amount to fade the god rays based on the camera movement More...
 
virtual void setUpZoomLevel (const DtOsgCullVisitorParameters *params) const
 set the triton internal zoom level based on the cull params zoom level or use the triton override value if it is enabled. More...
 
virtual void updatePrecipitation (DtOsgSkyObject *skyObject, bool isAboveWater) const
 update the precipitation for the sky object based on if the camera is above or below the water. More...
 
virtual void setUpViewport (Triton::Camera *tritonCamera, osg::Camera *camera) const
 setup the triton camera's viewport based on the current osg camera's viewport More...
 
virtual void checkGlErrors (void) const
 check for any gl errors and if it is a debug build then print out the errors. More...
 
virtual void restoreOsgState (osg::State &state) const
 restore the opengl state to match the expected osg opengl state More...
 
virtual void updatePlanarReflectionCamera (DtPlanarReflection *planarReflection, bool skyEnabled) const
 update the planar refelction camera, pass it the mirror matrix and update the fog color More...
 
virtual void slot_windowToBeDestroyed (DtWindow *window)
 slot for when a window is about to be destroyed so we can let triton know to clean up the VAO's More...
 
virtual void addGraphicsContextIfNecessary (osg::GraphicsContext *key)
 gets the current graphics context handle and stores it in a map with the osg GraphicsContext so we can clean up VAO's correctly needs to have the osg::GraphicsContext be the current active context so it should really only be called from a drawImplemenation() More...
 
virtual void setUpOceanMaskIfNecessary ()
 setup the ocean mask if it has not been setup yet. More...
 
virtual const osg::StateSet * shadowTechniqueStateSet (const osg::Camera *osgCamera) const
 get the state set for the DtOsgShadowTechnique for the passed in osg camera More...
 
virtual void updateSunIntensity (void) const
 Update the sun intensity for triton environment based upon silverlining/skyobject & hdr. More...
 
virtual void updateLighingBasedonSensorFX (osg::Camera *osgCamera) const
 Update the directional light position and intensity if SensorFX has been enabled. More...
 
virtual void setSpecularThreshold (float threshold)
 What percent cloudiness causes the ocean not to show specular. More...
 
virtual float specularThreshold () const
 

Protected Attributes

osg::ref_ptr< osg::TextureCubeMap > myCubeMap
 
Triton::ResourceLoader * myResourceLoader
 
Triton::Environment * myEnvironment
 
Triton::OceanmyOcean
 
double myDefaultDampingDistance
 
osg::Vec3 myOceanFloorNormal
 
osg::Vec3 myOceanFloorOrigin
 
bool myGeocentricFlag
 
bool myHeightMapFlag
 
bool myHeightMapChangedFlag
 
bool myBreakingWavesMapFlag
 
bool myBreakingWavesMapChangedFlag
 
float myDefaultVisibility
 
float mySurgeDepth
 
bool myInitializationComplete
 
bool myPrecipitationOverridden
 
bool mySavedPrecipitationState
 
bool myAllowUnderwater
 
float myLightThreshold
 
float mySpecularThreshold
 
osg::Vec4 myUnderwaterFogColor
 
double myUnderwaterVisibility
 
float myBreakerAmplitude
 
makVrv::DtEnvironmentInfomyEnvironmentInfo
 
makVrv::DtDemyDe
 
DtTritonBreakingWavesMapSuperManagermyBreakingWavesMapSuperManager
 
DtTritonCameraManagermyTritonCameraManager
 
osg::ref_ptr< osg::ClipNode > myClipNode
 
double myWindSpeed
 
DtTritonManager::TritonQuality myQuality
 
const DtTritonManagermyTritonManager
 
DtSignalConnectionManager myConnections
 
std::vector< osg::ref_ptr
< osg::Camera > > 
myDebugVisualsCameras
 
std::vector< osg::ref_ptr
< osg::Texture > > 
myDebugVisualsTextures
 
osg::ref_ptr< osg::Camera > myDebugHeightMapCamera
 
osg::ref_ptr< osg::Texture > myDebugHeightMapVisualTexture
 
bool myShowDebugHeightMapOverlay
 
DtTritonPlanarReflectionManagermyPlanarReflectionManager
 
DtTritonShaderUniformManagermyShaderUniformManger
 
ContextToHandleMap myOsgGcToOsGc
 
osg::ref_ptr< osg::Texture2D > myOceanMaskTexture
 
bool myMutableOceanMaskTextureSetup
 
DtVector4< doublemyVrvLatLongMinMax
 
bool mySetupFailed
 
bool myMutableShadersDirty
 
bool myMutableDisableDrawing
 
bool myMutableSimFrozen
 
std::vector< unsigned intmyMutableUserShaderVector
 
bool myNearFarValuesInitializedFromConfig
 
double myNearZConfig
 
double myFarZConfig
 
bool myOceanMaskTextureEnabled
 
DtTritonImGuiHelpermyImGuiHelper
 
DtTritonRenderingParameters myRenderingParameters
 

Private Member Functions

 DtTritonDrawable ()=delete
 Default Constructor not implemented. More...
 
 DtTritonDrawable (const DtTritonDrawable &drawable)=delete
 Copy Constructor not implemented – Copy not allowed use clone instead. More...
 
DtTritonDrawableoperator= (const DtTritonDrawable &)=delete
 Assignment Operator not implemented – Copy not allowed use clone. More...
 

Friends

class DtTritonImGuiHelper
 

Detailed Description

An OSG Drawable representing Triton's infinite ocean.

/ingroup vrvTriton

Member Typedef Documentation

typedef std::map< osg::GraphicsContext*, void* > makVrv::DtTritonDrawable::ContextToHandleMap
protected

Constructor & Destructor Documentation

makVrv::DtTritonDrawable::DtTritonDrawable ( makVrv::DtDe de,
const DtTritonManager tritonManager,
DtEnvironmentInfo environmentInfo,
bool  geocentric,
osg::TextureCubeMap *  environmentMap = NULL,
DtTritonManager::TritonQuality  tritonQuality = DtTritonManager::TritonQuality_Good 
)

CTOR.

virtual makVrv::DtTritonDrawable::~DtTritonDrawable ( )
protectedvirtual

Destructor.

makVrv::DtTritonDrawable::DtTritonDrawable ( )
privatedelete

Default Constructor not implemented.

makVrv::DtTritonDrawable::DtTritonDrawable ( const DtTritonDrawable drawable)
privatedelete

Copy Constructor not implemented – Copy not allowed use clone instead.

Member Function Documentation

DtTritonDrawable& makVrv::DtTritonDrawable::operator= ( const DtTritonDrawable )
privatedelete

Assignment Operator not implemented – Copy not allowed use clone.

virtual bool makVrv::DtTritonDrawable::isSameKindAs ( const Object *  obj) const
virtual

osg overridden functions for creating a derived class

virtual Object* makVrv::DtTritonDrawable::cloneType ( ) const
virtual

osg overridden functions for creating a derived class

virtual Object* makVrv::DtTritonDrawable::clone ( const osg::CopyOp &  copyop) const
virtual

osg overridden functions for creating a derived class

virtual Triton::Ocean* makVrv::DtTritonDrawable::ocean ( )
virtual

Return the underlying Triton::Ocean object.

virtual const Triton::Camera* makVrv::DtTritonDrawable::closestCameraTo ( const DtVector position) const
virtual

Closest triton camera, to the point in question.

virtual Triton::Environment* makVrv::DtTritonDrawable::environment ( )
virtual

Return the underlying Triton::Environment object.

virtual const Triton::Camera* makVrv::DtTritonDrawable::tritonCamera ( const osg::Camera *  osgCamera) const
virtual

The triton camera corresponding to osg camera.

virtual void makVrv::DtTritonDrawable::setBeach ( const osg::Vec3 &  beachOrigin,
const osg::Vec3 &  normal 
)
virtual

Pass info to Triton about the local ocean depth and floor slope.

virtual void makVrv::DtTritonDrawable::syncHeightMapToGpu ( DtHeightMapManager heightMapMgr,
const osg::State *  state,
const osg::Camera *  camera 
)
virtual

sends the height map to the gpu .

virtual void makVrv::DtTritonDrawable::drawImplementation ( osg::RenderInfo &  renderInfo) const
virtual

Perform drawing of the Ocean from the render thread.

virtual void makVrv::DtTritonDrawable::setPlanarReflectionsEnabled ( bool  enabled)
virtual

Toggle use of planar reflections of local objects.

virtual bool makVrv::DtTritonDrawable::planarReflectionsFlag ( ) const
virtual
virtual void makVrv::DtTritonDrawable::setBreakingWaveAmplitude ( float  meters)
virtual

Set/get height of breaking waves at shorelines. Set to 0 to disable.

virtual float makVrv::DtTritonDrawable::getBreakingWaveAmplitude ( ) const
virtual
virtual void makVrv::DtTritonDrawable::setHeightMap ( bool  enabled)
virtual

Toggle use of automatically generated height maps for coastal effects Only enable if you have bathymetry and no sea-level ocean polygons in the database!

virtual bool makVrv::DtTritonDrawable::heightMap ( ) const
virtual
virtual void makVrv::DtTritonDrawable::setQuality ( DtTritonManager::TritonQuality  quality)
virtual

Set quality of wave simulation - "good" yields best performance but least detail, "best" favors quality over performance.

Default is good.

virtual DtTritonManager::TritonQuality makVrv::DtTritonDrawable::getQuality ( ) const
virtual
virtual void makVrv::DtTritonDrawable::setBreakingWavesMap ( bool  enabled)
virtual

Toggle use of shapefile-based breaking wave areas and directions If off, breaking waves will be everywhere and direction determined from bathymetry.

virtual bool makVrv::DtTritonDrawable::breakingWavesMap ( ) const
virtual
virtual void makVrv::DtTritonDrawable::setMaxReflectionWindSpeed ( double  metersPerSecond)
virtual

Set the wind speed at which we blend out planar reflections (default 20 m/s)

virtual void makVrv::DtTritonDrawable::setUnderwaterFogColor ( const osg::Vec4 &  color)
virtual

Set/get the base (unlit) fog color when underwater.

virtual const osg::Vec4& makVrv::DtTritonDrawable::underwaterFogColor ( ) const
virtual
virtual void makVrv::DtTritonDrawable::setUnderwaterVisibility ( double  visibility)
virtual

Set/get the visibility when underwater.

virtual double makVrv::DtTritonDrawable::underwaterVisibility ( ) const
virtual
virtual void makVrv::DtTritonDrawable::setWaterVisibility ( double  visibility)
virtual

The visibility of the water when viewed from above (affects the transparency)

virtual double makVrv::DtTritonDrawable::waterVisibility ( ) const
virtual
virtual void makVrv::DtTritonDrawable::setSurgeDepth ( float  depth)
virtual

The depth at which we start dampening wave displacement.

virtual float makVrv::DtTritonDrawable::surgeDepth ( ) const
virtual
virtual bool makVrv::DtTritonDrawable::isInitialized ( ) const
virtual

Whether Triton has been fully initialized (after its first frame.)

virtual void makVrv::DtTritonDrawable::setAllowUnderwaterEffects ( bool  allow)
virtual

Whether underwater fog etc.

is triggered when eye goes under the water surface

virtual bool makVrv::DtTritonDrawable::allowUnderwaterEffects ( ) const
virtual

Whether underwater fog is enabled.

virtual void makVrv::DtTritonDrawable::setHeightMapResolution ( float  metersPerTexel)
virtual

Get/set the resolution of the height map for shallow water effects (meters per texel)

virtual float makVrv::DtTritonDrawable::heightMapResolution ( ) const
virtual
virtual void makVrv::DtTritonDrawable::setBreakingWavesMapResolution ( float  metersPerTexel)
virtual

Get/set the resolution of the breaking waves direction map (meters per texel)

virtual float makVrv::DtTritonDrawable::breakingWavesMapResolution ( ) const
virtual
virtual void makVrv::DtTritonDrawable::enableReflections ( bool  enabled)
virtual

Temporarily enable or disable the planar reflection camera(s).

virtual void makVrv::DtTritonDrawable::releaseGLObjects ( osg::State *  state = 0) const
virtual

Destroy the openGL objects.

virtual void makVrv::DtTritonDrawable::setHeightMapChanged ( )
virtual

Notify the drawable of an updated height map.

virtual void makVrv::DtTritonDrawable::setBreakingWavesMapChanged ( )
virtual

Notify the drawable of an updated breaking waves map.

virtual osg::ref_ptr<DtPlanarReflection> makVrv::DtTritonDrawable::getPlanarReflection ( osg::Camera *  camera)
virtual

accessor for the DtPlanarReflection object for a camera.

SensorFX needs access to setup the shaders correctly.

virtual osg::Group* makVrv::DtTritonDrawable::getTritonGeode ( )
virtual

accessor for the triton geode object

virtual const osg::Group* makVrv::DtTritonDrawable::getTritonGeode ( ) const
virtual
virtual DtHeightMapManager* makVrv::DtTritonDrawable::getOrCreateHeightMapManager ( osg::RenderInfo &  renderInfo)
virtual

get or create the height map manager for the current camera based on the renderInfo

virtual DtTritonBreakingWavesMapManager* makVrv::DtTritonDrawable::getOrCreateBreakingWavesMapManager ( osg::RenderInfo &  renderInfo)
virtual

get or create the breaking waves map manager for the current camera based on the renderInfo

virtual void makVrv::DtTritonDrawable::setWindSpeed ( double  windSpeed)
virtual

set the current wind speed to use

virtual bool makVrv::DtTritonDrawable::geocentricFlag ( )
virtual

get whether or not the ocean is using the geocentric coordinate sysetem or not

virtual void makVrv::DtTritonDrawable::setOceanMaskTextureEnabled ( bool  myOceanMaskTextureEnabled)
virtual

set/get whether or not to enable the ocean mask used by DtTritonManager.

If you want to set this call DtTritonManager::setOceanMaskTextureEnabled

virtual bool makVrv::DtTritonDrawable::isOceanMaskTextureEnabled ( ) const
virtual
virtual const DtTritonRenderingParameters& makVrv::DtTritonDrawable::renderingParameters ( void  ) const
virtual

get the rendering parameters (const)

virtual DtTritonRenderingParameters& makVrv::DtTritonDrawable::renderingParameters ( void  )
virtual

get the rendering parameters (cnon-const)

virtual void makVrv::DtTritonDrawable::shaderUpdateLightUniforms ( osg::RenderInfo &  info,
void *  context,
Triton::Camera *  camera 
) const
protectedvirtual

update the light uniforms for a particular shader

virtual void makVrv::DtTritonDrawable::updateImguiAndConstantsOffOfImgui ( )
protectedvirtual

setup the IMGui and read back any information from ImGui widgets

virtual void makVrv::DtTritonDrawable::updateImguiHeightMapDebugOverlay ( bool  needUpdate,
osg::RenderInfo &  renderInfo 
)
protectedvirtual

create the height map debug overlay

virtual bool makVrv::DtTritonDrawable::setup ( osg::RenderInfo &  renderInfo)
protectedvirtual

setup the triton drawable based on the render info called the first time the ocean is rendered or if the shaders are regenerated.

virtual void makVrv::DtTritonDrawable::cleanup ( void  )
protectedvirtual

called by the destructor or releaseGL objects to cleanup this drawable's state

virtual void makVrv::DtTritonDrawable::removePlanarReflections ( )
protectedvirtual

tell the planar reflection manager to cleanup all its reflections

virtual void makVrv::DtTritonDrawable::slot_reloadShader ( )
protectedvirtual

connected to the shared state reload shader signal in order to clean up the triton shaders

virtual void makVrv::DtTritonDrawable::initShaderUniformHandles ( void *  context,
Triton::Camera *  camera 
) const
protectedvirtual

initialize the uniform handles for the current context

virtual void makVrv::DtTritonDrawable::applyLighting ( osg::RenderInfo &  info,
void *  context,
Triton::Camera *  camera 
) const
protectedvirtual

setup and apply the lighting for this frame

virtual void makVrv::DtTritonDrawable::applyQuality ( ) const
protectedvirtual

update the drawable to use the current quality setting for the triton ocean

virtual void makVrv::DtTritonDrawable::setUpNearFarIfNecessary ( void  ) const
protectedvirtual

update clip planes if needed(e.g. if reverse z changed somehow)

virtual void makVrv::DtTritonDrawable::updateShader ( osg::Node *  node,
osg::State &  state,
void *  context,
Triton::Camera *  camera 
) const
protectedvirtual

called every time the drawable renders to check if the shader state has changed and if so it updates the shaders

virtual void makVrv::DtTritonDrawable::setSpecularThreshold ( float  threshold)
protectedvirtual

What percent cloudiness causes the ocean not to show specular.

virtual float makVrv::DtTritonDrawable::specularThreshold ( ) const
protectedvirtual
virtual void makVrv::DtTritonDrawable::slot_heightMapChanged ( DtHeightMapManager manager)
protectedvirtual

Handles the signal for when a height map changes.

virtual void makVrv::DtTritonDrawable::slot_heightMapCameraChanged ( )
protectedvirtual

Handles the signal for when an associated height map camera changes.

virtual void makVrv::DtTritonDrawable::flushInvalidCameras ( )
protectedvirtual

check if the osg::Camera still is valid. If not then destroy the corrisponding triton camera

virtual void makVrv::DtTritonDrawable::onPostTick ( void  )
protectedvirtual

connected to the post tick signal and is used to call the triton ocean's post draw function

virtual void makVrv::DtTritonDrawable::prepEnvironmentMap ( const DtOsgSkyObject skyObject,
const osg::Camera *  camera,
const osg::State &  state 
) const
protectedvirtual

setup the environment map by getting it from the sky object

virtual void makVrv::DtTritonDrawable::prepHeightMapAndBreakingWavesMaps ( DtHeightMapManager heightMapMgr,
DtTritonBreakingWavesMapManager breakingWavesMapMgr,
const osg::State &  state,
osg::RenderInfo &  renderInfo 
) const
protectedvirtual

utility function for setting up the height map and breaking wave maps for rendering.

virtual void makVrv::DtTritonDrawable::prepReflectionMap ( osg::ref_ptr< DtPlanarReflection planarReflectionCamera,
const osg::State &  state 
) const
protectedvirtual

utility function for setting up the reflection map for rendering.

virtual void makVrv::DtTritonDrawable::setupTritonLightFogVisibility ( const osg::Camera *  camera,
DtOsgSkyObject skyObject,
bool  isAboveWater,
bool  skyEnabled 
) const
protectedvirtual

calculate the current fog value based on if the camera is under the water or not

virtual void makVrv::DtTritonDrawable::setUpTritonParticlesAdditiveBlend ( void  ) const
protectedvirtual

sets up the particle blend setting in triton based on if HDR is on or off

virtual void makVrv::DtTritonDrawable::setUpGodRaysFading ( const DtOsgCullVisitorParameters params) const
protectedvirtual

sets up the amount to fade the god rays based on the camera movement

virtual void makVrv::DtTritonDrawable::setUpZoomLevel ( const DtOsgCullVisitorParameters params) const
protectedvirtual

set the triton internal zoom level based on the cull params zoom level or use the triton override value if it is enabled.

virtual void makVrv::DtTritonDrawable::updatePrecipitation ( DtOsgSkyObject skyObject,
bool  isAboveWater 
) const
protectedvirtual

update the precipitation for the sky object based on if the camera is above or below the water.

virtual void makVrv::DtTritonDrawable::setUpViewport ( Triton::Camera *  tritonCamera,
osg::Camera *  camera 
) const
protectedvirtual

setup the triton camera's viewport based on the current osg camera's viewport

virtual void makVrv::DtTritonDrawable::checkGlErrors ( void  ) const
protectedvirtual

check for any gl errors and if it is a debug build then print out the errors.

virtual void makVrv::DtTritonDrawable::restoreOsgState ( osg::State &  state) const
protectedvirtual

restore the opengl state to match the expected osg opengl state

virtual void makVrv::DtTritonDrawable::updatePlanarReflectionCamera ( DtPlanarReflection planarReflection,
bool  skyEnabled 
) const
protectedvirtual

update the planar refelction camera, pass it the mirror matrix and update the fog color

virtual void makVrv::DtTritonDrawable::slot_windowToBeDestroyed ( DtWindow window)
protectedvirtual

slot for when a window is about to be destroyed so we can let triton know to clean up the VAO's

virtual void makVrv::DtTritonDrawable::addGraphicsContextIfNecessary ( osg::GraphicsContext *  key)
protectedvirtual

gets the current graphics context handle and stores it in a map with the osg GraphicsContext so we can clean up VAO's correctly needs to have the osg::GraphicsContext be the current active context so it should really only be called from a drawImplemenation()

virtual void makVrv::DtTritonDrawable::setUpOceanMaskIfNecessary ( )
protectedvirtual

setup the ocean mask if it has not been setup yet.

virtual const osg::StateSet* makVrv::DtTritonDrawable::shadowTechniqueStateSet ( const osg::Camera *  osgCamera) const
protectedvirtual

get the state set for the DtOsgShadowTechnique for the passed in osg camera

virtual void makVrv::DtTritonDrawable::updateSunIntensity ( void  ) const
protectedvirtual

Update the sun intensity for triton environment based upon silverlining/skyobject & hdr.

virtual void makVrv::DtTritonDrawable::updateLighingBasedonSensorFX ( osg::Camera *  osgCamera) const
protectedvirtual

Update the directional light position and intensity if SensorFX has been enabled.

Friends And Related Function Documentation

friend class DtTritonImGuiHelper
friend

Member Data Documentation

boost::signalslib::signal<void()> makVrv::DtTritonDrawable::signal_postInitialize

Emitted when Triton has been initialized.

osg::ref_ptr< osg::TextureCubeMap > makVrv::DtTritonDrawable::myCubeMap
protected
Triton::ResourceLoader* makVrv::DtTritonDrawable::myResourceLoader
protected
Triton::Environment* makVrv::DtTritonDrawable::myEnvironment
protected
Triton::Ocean* makVrv::DtTritonDrawable::myOcean
protected
double makVrv::DtTritonDrawable::myDefaultDampingDistance
protected
osg::Vec3 makVrv::DtTritonDrawable::myOceanFloorNormal
protected
osg::Vec3 makVrv::DtTritonDrawable::myOceanFloorOrigin
protected
bool makVrv::DtTritonDrawable::myGeocentricFlag
protected
bool makVrv::DtTritonDrawable::myHeightMapFlag
protected
bool makVrv::DtTritonDrawable::myHeightMapChangedFlag
protected
bool makVrv::DtTritonDrawable::myBreakingWavesMapFlag
protected
bool makVrv::DtTritonDrawable::myBreakingWavesMapChangedFlag
protected
float makVrv::DtTritonDrawable::myDefaultVisibility
protected
float makVrv::DtTritonDrawable::mySurgeDepth
protected
bool makVrv::DtTritonDrawable::myInitializationComplete
protected
bool makVrv::DtTritonDrawable::myPrecipitationOverridden
protected
bool makVrv::DtTritonDrawable::mySavedPrecipitationState
protected
bool makVrv::DtTritonDrawable::myAllowUnderwater
protected
float makVrv::DtTritonDrawable::myLightThreshold
protected
float makVrv::DtTritonDrawable::mySpecularThreshold
protected
osg::Vec4 makVrv::DtTritonDrawable::myUnderwaterFogColor
protected
double makVrv::DtTritonDrawable::myUnderwaterVisibility
protected
float makVrv::DtTritonDrawable::myBreakerAmplitude
protected
makVrv::DtEnvironmentInfo& makVrv::DtTritonDrawable::myEnvironmentInfo
protected
makVrv::DtDe& makVrv::DtTritonDrawable::myDe
protected
DtTritonBreakingWavesMapSuperManager* makVrv::DtTritonDrawable::myBreakingWavesMapSuperManager
protected
DtTritonCameraManager* makVrv::DtTritonDrawable::myTritonCameraManager
protected
osg::ref_ptr< osg::ClipNode > makVrv::DtTritonDrawable::myClipNode
protected
double makVrv::DtTritonDrawable::myWindSpeed
protected
DtTritonManager::TritonQuality makVrv::DtTritonDrawable::myQuality
protected
const DtTritonManager& makVrv::DtTritonDrawable::myTritonManager
protected
DtSignalConnectionManager makVrv::DtTritonDrawable::myConnections
protected
std::vector<osg::ref_ptr<osg::Camera> > makVrv::DtTritonDrawable::myDebugVisualsCameras
protected
std::vector<osg::ref_ptr<osg::Texture> > makVrv::DtTritonDrawable::myDebugVisualsTextures
protected
osg::ref_ptr<osg::Camera> makVrv::DtTritonDrawable::myDebugHeightMapCamera
protected
osg::ref_ptr<osg::Texture> makVrv::DtTritonDrawable::myDebugHeightMapVisualTexture
protected
bool makVrv::DtTritonDrawable::myShowDebugHeightMapOverlay
protected
DtTritonPlanarReflectionManager* makVrv::DtTritonDrawable::myPlanarReflectionManager
protected
DtTritonShaderUniformManager* makVrv::DtTritonDrawable::myShaderUniformManger
protected
ContextToHandleMap makVrv::DtTritonDrawable::myOsgGcToOsGc
protected
osg::ref_ptr<osg::Texture2D> makVrv::DtTritonDrawable::myOceanMaskTexture
protected
bool makVrv::DtTritonDrawable::myMutableOceanMaskTextureSetup
protected
DtVector4<double> makVrv::DtTritonDrawable::myVrvLatLongMinMax
protected
bool makVrv::DtTritonDrawable::mySetupFailed
protected
bool makVrv::DtTritonDrawable::myMutableShadersDirty
mutableprotected
bool makVrv::DtTritonDrawable::myMutableDisableDrawing
mutableprotected
bool makVrv::DtTritonDrawable::myMutableSimFrozen
mutableprotected
std::vector<unsigned int> makVrv::DtTritonDrawable::myMutableUserShaderVector
mutableprotected
bool makVrv::DtTritonDrawable::myNearFarValuesInitializedFromConfig
mutableprotected
double makVrv::DtTritonDrawable::myNearZConfig
protected
double makVrv::DtTritonDrawable::myFarZConfig
protected
bool makVrv::DtTritonDrawable::myOceanMaskTextureEnabled
protected
DtTritonImGuiHelper* makVrv::DtTritonDrawable::myImGuiHelper
protected
DtTritonRenderingParameters makVrv::DtTritonDrawable::myRenderingParameters
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)