![]() |
VR-Forces 4.10 Class Documentation
|
This class provides an OSG-specific implementation of water drops on the screen. More...

Classes | |
| struct | GridCell |
Public Member Functions | |
| DtWaterOnScreen (DtDe &de, const std::string &postProcessType, bool handles2D) | |
| Constructor. More... | |
| virtual | ~DtWaterOnScreen () |
| Destructor. More... | |
| virtual void | activateRaindrops (bool on) |
| Activates or deactivates the raindrops-on-screen effect. More... | |
| virtual void | activateSplashes (bool on) |
| Activates or deactivates the splashes on screen effect. More... | |
| virtual void | activateSpray (bool on) |
| Activates or deactivates ocean spray on screen effect. More... | |
| virtual void | setIsUnderwater (bool underwater) |
| Tells effect we are underwater, and no screen effects should exist. More... | |
| virtual void | addRainDrop (float x, float y, float radius) |
| Add a single raindrop. More... | |
| virtual void | addOceanSplash (float intensity) |
| Adds one frame's worth of large splashes on the screen, in response to a submerging or surfacing viewpoint. More... | |
| virtual void | setSplashIntensity (float intensity) |
| Sets the overall intensity of the splash effect (0-1) More... | |
| virtual void | setSprayIntensity (float intensity) |
| Sets the overall intensity of the spray effect (0-1) More... | |
| virtual bool | update (DtChannel *channel) |
| Called once per frame from the DtPostProcessManager. More... | |
| virtual int | numActiveDrops () const |
| How many drops are currently on the screen. More... | |
| virtual void | setWaterOnScreenSize (double size) |
| Set the size of the water on screen effect(Rain Splash / Ocean Spray / Wave Splash) in percentage, default is 100(%) More... | |
| virtual void | addSplashEffects (const DtObserverObject *observer, bool hasWaveSplashEffect) |
| Query the DtOsgSkyObject, DtTritonManager, and channel observer to determine whether to draw screen space ocean splash effects. More... | |
| virtual void | addSprayEffects (const DtObserverObject *observer, bool hasOceanSprayEffect) |
| Query the DtOsgSkyObject, DtTritonManager, and channel observer to determine whether to draw screen space ocean spray effects (when near the surface of the ocean) More... | |
Public Member Functions inherited from makVrv::DtPostProcessor | |
| DtPostProcessor (DtDe &de, const std::string &postProcessType, bool handles2D) | |
| CTOR. More... | |
| virtual | ~DtPostProcessor () |
| DTOR. More... | |
| virtual void | setFragmentShaderSource (const char *source) |
| Sets fragment shader source for this post-processor. More... | |
| virtual void | setVertexShaderSource (const char *source) |
| Sets vertex shader source for this post-processor. More... | |
| virtual void | setFragmentShaderFile (const std::string &fileName) |
| Sets fragment shader file for this post-processor. More... | |
| virtual void | setVertexShaderFile (const std::string &fileName) |
| Sets vertex shader file for this post-processor. More... | |
| virtual void | setInputTexture (const DtChannel *channel, osg::Texture *texture) |
| Sets the image that is postprocessed; this may be the 3D scene rendered to a texture, or the output texture of a chained post processor. More... | |
| virtual osg::Texture * | outputTexture () |
| Gets the output texture of this post processor, for use in chaining processors together. More... | |
| virtual void | setIsFinalEffect (const DtChannel *channel, bool final) |
| Called by the DtPostProcessManager to indicate if this is the last post processor in the chain, and should render to the framebuffer. More... | |
| virtual osg::Camera * | cameraForChannel (const DtChannel *channel) |
| Gets the Camera node associated with this effect and channel. More... | |
| virtual void | slot_releaseResources () |
| used to call releaseGLObjects on this post processor's openGL related objects when the last window is removed. More... | |
| virtual bool | hasEffect (const std::string &effect) |
| Does this post processor support this effect? More... | |
| virtual bool | effectEnabled (const std::string &effect) |
| Is this effect (post processor sub-component) enabled? More... | |
| virtual bool | anyEffectEnabled () |
| Are any effects enabled? More... | |
| virtual std::list< std::string > | supportedEffects () |
| Get a list of supported effects for this post processor. More... | |
| virtual bool | handles2D () const |
| Retrieves whether this post processor should be used in 2D orthographic views, as specified in its constructor. More... | |
| virtual const std::string & | type () const |
| Gets the type of the post processor. More... | |
| virtual bool | postProcessorEnabled () const |
| Is this post processor enabled? More... | |
| virtual bool | enableEffect (const std::string &effect) |
| Enable a particular post processing technique For example, "wateroncamera" has techniques "rainsplash", "oceanspray", and "wavesplash". More... | |
| virtual bool | disableEffect (const std::string &effect) |
| virtual void | enablePostProcessor () |
| Enable or disable the post processor. More... | |
| virtual void | disablePostProcessor () |
Static Public Member Functions | |
| static double | waterOnScreenSize () |
| Get the size of the water on screen effect(Rain Splash / Ocean Spray / Wave Splash) in percentage, default is 100(%) More... | |
Static Public Attributes | |
| static double | theWaterOnScreenSize |
Protected Member Functions | |
| virtual void | initialize () |
| initialize More... | |
| virtual void | clearNormalMap () |
| clear the normal map to 0 More... | |
| virtual void | updateAndDrawDrops (double elapsedTime) |
| generate the normal map by drawing all the active drops into it More... | |
| virtual void | finalizeNormalMap (void) |
| finalize the normal map (make a rgb float texture from the int normal map) More... | |
| virtual void | addRaindrops (double time, float heading, float observerVelocity, const DtVector &observerLocation) |
| add a rain drop More... | |
| virtual void | addSpray (double time, float heading) |
| add a spray particle More... | |
| virtual void | clearDrops () |
| clear the drops More... | |
| virtual void | reset () |
| reset More... | |
| virtual void | setActiveStatus () |
| set active More... | |
| virtual void | slot_waterOnScreenSizeChanged (double value) |
| slot for when water on screen size changes More... | |
| virtual void | releaseGLObjects () override |
| cleanup graphics related objects More... | |
| virtual void | cleanupGpuMemory (void) |
| clean the gpu memory More... | |
| virtual void | createNormalMapIfNecessary (void) |
| create normal and initialize, if not already More... | |
| virtual void | createNormalMapCombineProgramIfNecessary (void) |
| create normal combine program and initialize, if not already More... | |
| virtual void | createNormalMapFinalizeProgramIfNecessary (void) |
| create normal finalize program and initialize, if not already More... | |
| virtual void | initZeroNormals (void) |
| init the vector of zero normals that are used to clear out the normal map More... | |
Protected Member Functions inherited from makVrv::DtPostProcessor | |
| virtual bool | effectItrEnabled (const EffectMap::iterator &effect) |
| virtual void | addEffect (std::string effect) |
| When constructing a post processor, add the names of the sub-components (effects) that can be enabled and disabled. More... | |
| virtual void | setEnablePostProcessor (bool enabled) |
| Set the post processor enabled state (true = enabled) More... | |
Private Member Functions | |
| DtWaterOnScreen ()=delete | |
| private default constructor. not allowed. More... | |
| DtWaterOnScreen (const DtWaterOnScreen &)=delete | |
| prevent copy-construction More... | |
| DtWaterOnScreen & | operator= (const DtWaterOnScreen &)=delete |
| prevent assignment More... | |
Additional Inherited Members | |
Protected Types inherited from makVrv::DtPostProcessor | |
| typedef boost::unordered_map < std::string, bool > | EffectMap |
| typedef std::map< const DtChannel *, osg::ref_ptr < osg::Camera > > | CameraMap |
| typedef osg::ref_ptr < DtPostProcessorCullVistorCallback > | CallbackRefPtr |
| typedef std::map< const DtChannel *, CallbackRefPtr > | CallbackMap |
This class provides an OSG-specific implementation of water drops on the screen.
| makVrv::DtWaterOnScreen::DtWaterOnScreen | ( | DtDe & | de, |
| const std::string & | postProcessType, | ||
| bool | handles2D | ||
| ) |
Constructor.
|
virtual |
Destructor.
|
privatedelete |
private default constructor. not allowed.
|
privatedelete |
prevent copy-construction
|
privatedelete |
prevent assignment
|
virtual |
Activates or deactivates the raindrops-on-screen effect.
|
virtual |
Activates or deactivates the splashes on screen effect.
(From a submerging observer.)
|
virtual |
Activates or deactivates ocean spray on screen effect.
|
virtual |
Tells effect we are underwater, and no screen effects should exist.
|
virtual |
Add a single raindrop.
All parameters are normalized against the viewport dimensions (0-1)
|
virtual |
Adds one frame's worth of large splashes on the screen, in response to a submerging or surfacing viewpoint.
|
virtual |
Sets the overall intensity of the splash effect (0-1)
|
virtual |
Sets the overall intensity of the spray effect (0-1)
Called once per frame from the DtPostProcessManager.
Implements makVrv::DtPostProcessor.
|
virtual |
How many drops are currently on the screen.
|
virtual |
Set the size of the water on screen effect(Rain Splash / Ocean Spray / Wave Splash) in percentage, default is 100(%)
|
virtual |
Query the DtOsgSkyObject, DtTritonManager, and channel observer to determine whether to draw screen space ocean splash effects.
|
virtual |
Query the DtOsgSkyObject, DtTritonManager, and channel observer to determine whether to draw screen space ocean spray effects (when near the surface of the ocean)
|
static |
Get the size of the water on screen effect(Rain Splash / Ocean Spray / Wave Splash) in percentage, default is 100(%)
|
protectedvirtual |
initialize
Reimplemented from makVrv::DtPostProcessor.
|
protectedvirtual |
clear the normal map to 0
|
protectedvirtual |
generate the normal map by drawing all the active drops into it
|
protectedvirtual |
finalize the normal map (make a rgb float texture from the int normal map)
|
protectedvirtual |
add a rain drop
|
protectedvirtual |
add a spray particle
|
protectedvirtual |
clear the drops
|
protectedvirtual |
reset
|
protectedvirtual |
set active
|
protectedvirtual |
slot for when water on screen size changes
|
overrideprotectedvirtual |
cleanup graphics related objects
Reimplemented from makVrv::DtPostProcessor.
|
protectedvirtual |
clean the gpu memory
|
protectedvirtual |
create normal and initialize, if not already
|
protectedvirtual |
create normal combine program and initialize, if not already
|
protectedvirtual |
create normal finalize program and initialize, if not already
|
protectedvirtual |
init the vector of zero normals that are used to clear out the normal map
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
The various normal map mod programs.
|
protected |
|
protected |
|
protected |
|
protected |
The generated normal map texture.
|
protected |
The gpu buffer representing the interim normal map (ssbo)
|
protected |
The gpu buffer representing the constant pre-computed droplet normals.
|
protected |
|
protected |
The gpu buffer representing the constant pre-computed splash normals.
|
protected |
|
protected |
The grid cells that end up into the gpu buffer next.
|
protected |
The cells' buffer on the gpu (ssbo)
The zero normals buffer (used to clear the normal map to zero)
|
protected |
|
static |