VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes
makVrv::DtOsgWaterRipplesManager Class Reference

The DtOsgWaterRipplesManager class provides a manager for managing water ripple effects for water bodies.

Although this class is a singleton, it is always initialized by the DtOsgRenderer when using an opengl API.

This manager tracks terrain patches that have water ripple presets and applies water ripple textures to them. Generally there will be only one terrain patch (for example an osgEarth terrain patch).

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

Classes

struct  PerChannelData
 
struct  TerrainPatchInfo
 
class  TextureAddressOp
 

Public Member Functions

virtual ~DtOsgWaterRipplesManager ()
 
 DtOsgWaterRipplesManager (const DtOsgWaterRipplesManager &other)=delete
 
 DtOsgWaterRipplesManager (const DtOsgWaterRipplesManager &&other)=delete
 
DtOsgWaterRipplesManager & operator= (const DtOsgWaterRipplesManager &other)=delete
 
DtOsgWaterRipplesManager & operator= (const DtOsgWaterRipplesManager &&other)=delete
 
virtual void releaseGLObjects (osg::State *state)
 
virtual void freePerChannelData ()
 
virtual void updateChannel (DtOsgChannel *channel, const osg::Vec3d &cameraPos)
 
virtual void initializeWaterRipples ()
 
virtual void updateTextureUniforms ()
 
virtual void update ()
 
- Public Member Functions inherited from makVrv::DtWaterRipplesManager
virtual ~DtWaterRipplesManager ()
 
 DtWaterRipplesManager (const DtWaterRipplesManager &other)=delete
 
 DtWaterRipplesManager (const DtWaterRipplesManager &&other)=delete
 
DtWaterRipplesManager & operator= (const DtWaterRipplesManager &other)=delete
 
DtWaterRipplesManager & operator= (const DtWaterRipplesManager &&other)=delete
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Member Functions

static DtOsgWaterRipplesManager & instance (DtDe &de)
 
static void registerInstance (DtDe &de)
 
- Static Public Member Functions inherited from makVrv::DtWaterRipplesManager
static const std::string & theClassName ()
 
static DtWaterRipplesManager & instance (DtDe &de)
 

Protected Types

typedef std::map
< osg::observer_ptr
< osg::Camera >
, DtOsgWaterRipplesManager::PerChannelData * > 
PerChannelDataMap
 

Protected Member Functions

virtual bool shouldShowInChannel (DtOsgChannel *channel) const
 
virtual
DtOsgWaterRipplesManager::TextureAddressOp * 
createTextureAddressOp ()
 
DtOsgWaterRipplesManager::PerChannelData & getOrCreatePerChannelData (osg::Camera *camera)
 
virtual void flushInvalidChannels ()
 
virtual void initializePerChannelData ()
 
virtual void updateImGui ()
 
virtual void updateImGuiPreset (DtWaterRipplesManager::PresetInfo &preset)
 
virtual void onApplyPreset (DtWaterRipplesManager::PresetInfo &preset, bool applyNoiseAndShape)
 
virtual void updateUniforms ()
 
virtual int getTextureSizeForIndex (int index) const
 
virtual int getTextureIndexForSize (int size) const
 
virtual osg::StateSet * getMapNodeStateSet (DtTerrainPatchObject &tpo) const
 
virtual void slot_waterRipplesPresetChanged (const makArchives::DtWaterRipplesSettingsRecord::PresetInfo &presetInfo)
 
virtual void slot_terrainPatchCreated (DtTerrainPatchObject &patch)
 
virtual void slot_terrainPatchAboutToBeDeleted (DtTerrainPatchObject &patch)
 
 DtOsgWaterRipplesManager (DtDe &de)
 
- Protected Member Functions inherited from makVrv::DtWaterRipplesManager
 DtWaterRipplesManager (DtDe &de)
 

Static Protected Member Functions

static bool presetsDiffer (const DtWaterRipplesManager::PresetInfo &a, const DtWaterRipplesManager::PresetInfo &b, bool &outProceduralChange, bool &outRuntimeChange)
 

Protected Attributes

DtSignalConnectionManager myConnections
 
TextureAddressOp * myTextureAddressOp
 
DtOsgWaterRipplesManager::PerChannelDataMap myPerChannelDataMap
 
std::map< DtTerrainPatchObject
*, DtOsgWaterRipplesManager::TerrainPatchInfo * > 
myTerrainPatchMap
 
std::vector
< DtWaterRipplesManager::PresetInfo > 
myPresets
 
std::vector< int > myTextureSizes
 
- Protected Attributes inherited from makVrv::DtWaterRipplesManager
DtDe & myDe
 

Member Typedef Documentation

typedef std::map< osg::observer_ptr<osg::Camera>, DtOsgWaterRipplesManager::PerChannelData*> makVrv::DtOsgWaterRipplesManager::PerChannelDataMap
protected

Constructor & Destructor Documentation

virtual makVrv::DtOsgWaterRipplesManager::~DtOsgWaterRipplesManager ( )
virtual
makVrv::DtOsgWaterRipplesManager::DtOsgWaterRipplesManager ( const DtOsgWaterRipplesManager &  other)
delete

Copy Constructor not implemented - Copy not allowed.

makVrv::DtOsgWaterRipplesManager::DtOsgWaterRipplesManager ( const DtOsgWaterRipplesManager &&  other)
delete

Move Constructor not implemented - Move not allowed.

makVrv::DtOsgWaterRipplesManager::DtOsgWaterRipplesManager ( DtDe &  de)
protected

Member Function Documentation

static DtOsgWaterRipplesManager& makVrv::DtOsgWaterRipplesManager::instance ( DtDe &  de)
static

Get/Create the DtOsgWaterRipplesManager instance. Use DtOsgWaterRipplesManager::registerInstance(...) to override the class instance.

static void makVrv::DtOsgWaterRipplesManager::registerInstance ( DtDe &  de)
static

Register the provided instance of a DtOsgWaterRipplesManager.

DtOsgWaterRipplesManager& makVrv::DtOsgWaterRipplesManager::operator= ( const DtOsgWaterRipplesManager &  other)
delete

Assignment Operator not implemented - Assignment not allowed.

DtOsgWaterRipplesManager& makVrv::DtOsgWaterRipplesManager::operator= ( const DtOsgWaterRipplesManager &&  other)
delete

Move Assignment Operator not implemented - Move Assignment not allowed.

virtual void makVrv::DtOsgWaterRipplesManager::releaseGLObjects ( osg::State *  state)
virtual

release the gl objects for this class.

virtual void makVrv::DtOsgWaterRipplesManager::freePerChannelData ( )
virtual

Free all per channel data.

virtual void makVrv::DtOsgWaterRipplesManager::updateChannel ( DtOsgChannel *  channel,
const osg::Vec3d &  cameraPos 
)
virtual

Ensures that perChannelData is associated with the given channel when there are water ripples active for a terrain patch.

virtual void makVrv::DtOsgWaterRipplesManager::initializeWaterRipples ( )
virtual

Initialize water ripples for all tracked channels.

virtual void makVrv::DtOsgWaterRipplesManager::updateTextureUniforms ( )
virtual

called by the GPU arena per frame, per context to check if the texture has been assigned an address.

virtual void makVrv::DtOsgWaterRipplesManager::update ( )
virtual

called by DtOsgRenderer::update(). Updates/maintains PerChannelData objects. Updates ImGui interface.

virtual bool makVrv::DtOsgWaterRipplesManager::shouldShowInChannel ( DtOsgChannel *  channel) const
protectedvirtual

Determines if water ripples should show for the given channel.

virtual DtOsgWaterRipplesManager::TextureAddressOp* makVrv::DtOsgWaterRipplesManager::createTextureAddressOp ( )
protectedvirtual

Create the texture address operation that is needed to update the bindless texture addresses that are passed to the shader. The operation is called from the GPU arena at the appropriate time.

DtOsgWaterRipplesManager::PerChannelData& makVrv::DtOsgWaterRipplesManager::getOrCreatePerChannelData ( osg::Camera *  camera)
protected

Get or create the per channel data for the provided camera.

virtual void makVrv::DtOsgWaterRipplesManager::flushInvalidChannels ( )
protectedvirtual

Check if the channel still is valid. If not then destroy the associated channel data.

virtual void makVrv::DtOsgWaterRipplesManager::initializePerChannelData ( )
protectedvirtual

Called to see if any existing PerChannelData objects need to be initialized. Each PerChannelData object contains a water ripples object that may need initialized.

virtual void makVrv::DtOsgWaterRipplesManager::updateImGui ( )
protectedvirtual

Update the ImGui interface for water ripples.

virtual void makVrv::DtOsgWaterRipplesManager::updateImGuiPreset ( DtWaterRipplesManager::PresetInfo &  preset)
protectedvirtual

Update the ImGui interface for the provided preset.

virtual void makVrv::DtOsgWaterRipplesManager::onApplyPreset ( DtWaterRipplesManager::PresetInfo &  preset,
bool  applyNoiseAndShape 
)
protectedvirtual

Updates the myPerChannelDataMap presets from the current settings.

virtual void makVrv::DtOsgWaterRipplesManager::updateUniforms ( )
protectedvirtual

Update any shader uniforms that need updating for water ripples.

virtual int makVrv::DtOsgWaterRipplesManager::getTextureSizeForIndex ( int  index) const
protectedvirtual

Internal helper to get a texture size for the provided GUI index. There are a preset set of texture sizes available for water ripple textures.

virtual int makVrv::DtOsgWaterRipplesManager::getTextureIndexForSize ( int  size) const
protectedvirtual

Internal helper to get a GUI index for the provided texture size. There are a preset set of texture sizes available for water ripple textures.

virtual osg::StateSet* makVrv::DtOsgWaterRipplesManager::getMapNodeStateSet ( DtTerrainPatchObject &  tpo) const
protectedvirtual

Get the StateSet for the map node of the terrain patch.

static bool makVrv::DtOsgWaterRipplesManager::presetsDiffer ( const DtWaterRipplesManager::PresetInfo &  a,
const DtWaterRipplesManager::PresetInfo &  b,
bool &  outProceduralChange,
bool &  outRuntimeChange 
)
staticprotected

Compare if two PresetInfo objects are not equal. outProceduralChange is set to true if there is a change in procedural settings. outRuntimeChange is set to true if there is a change in runtime settings. Does not compare the preset name.

virtual void makVrv::DtOsgWaterRipplesManager::slot_waterRipplesPresetChanged ( const makArchives::DtWaterRipplesSettingsRecord::PresetInfo &  presetInfo)
protectedvirtual

Slot called when a water ripple preset has changed.

virtual void makVrv::DtOsgWaterRipplesManager::slot_terrainPatchCreated ( DtTerrainPatchObject &  patch)
protectedvirtual

Used to determine if a osgEarth terrain patch has been added to the terrain. This manager will track terrain patches that have water ripple presets.

virtual void makVrv::DtOsgWaterRipplesManager::slot_terrainPatchAboutToBeDeleted ( DtTerrainPatchObject &  patch)
protectedvirtual

Used to determine if a osgEarth terrain patch has been removed from the terrain. Removes any tracking of the terrain patch from this manager.

Member Data Documentation

DtSignalConnectionManager makVrv::DtOsgWaterRipplesManager::myConnections
protected
TextureAddressOp* makVrv::DtOsgWaterRipplesManager::myTextureAddressOp
protected
DtOsgWaterRipplesManager::PerChannelDataMap makVrv::DtOsgWaterRipplesManager::myPerChannelDataMap
protected
std::map<DtTerrainPatchObject*, DtOsgWaterRipplesManager::TerrainPatchInfo*> makVrv::DtOsgWaterRipplesManager::myTerrainPatchMap
protected
std::vector<DtWaterRipplesManager::PresetInfo> makVrv::DtOsgWaterRipplesManager::myPresets
protected
std::vector<int> makVrv::DtOsgWaterRipplesManager::myTextureSizes
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)