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

Classes | |
| class | GridCell |
| Internal class for one cell of our grid of glass properties. More... | |
Public Member Functions | |
| DtWaterOnScreen (DtDe &de, const std::string &postProcessType, bool handles2D) | |
| Constructor. | |
| virtual | ~DtWaterOnScreen () |
| Destructor. | |
| void | activateRaindrops (bool on) |
| Activates or deactivates the raindrops-on-screen effect. | |
| void | activateSplashes (bool on) |
| Activates or deactivates the splashes on screen effect. | |
| void | activateSpray (bool on) |
| Activates or deactivates ocean spray on screen effect. | |
| void | setIsUnderwater (bool underwater) |
| Tells effect we are underwater, and no screen effects should exist. | |
| void | addRainDrop (float x, float y, float radius) |
| Add a single raindrop. | |
| void | addOceanSplash (float intensity) |
| Adds one frame's worth of large splashes on the screen, in response to a submerging or surfacing viewpoint. | |
| void | setSplashIntensity (float intensity) |
| Sets the overall intensity of the splash effect (0-1) | |
| void | setSprayIntensity (float intensity) |
| Sets the overall intensity of the spray effect (0-1) | |
| virtual bool | update (DtChannel *channel) |
| Called once per frame from the DtPostProcessManager. | |
| int | getNumActiveDrops () const |
| How many drops are currently on the screen. | |
| void | setWaterOnScreenSize (double size) |
| Set the size of the water on screen effect(Rain Splash / Ocean Spray / Wave Splash) in percentage, default is 100(%) | |
| void | addSplashEffects (const DtObserverObject *observer, bool hasWaveSplashEffect) |
| Query the DtOsgSkyObject, DtTritonManager, and channel observer to determine whether to draw screen space ocean splash effects. | |
| 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) | |
Public Member Functions inherited from makVrv::DtPostProcessor | |
| DtPostProcessor (const std::string &postProcessType, bool handles2D) | |
| CTOR. | |
| virtual | ~DtPostProcessor () |
| DTOR. | |
| virtual void | setFragmentShaderSource (const char *source) |
| Sets fragment shader source for this post-processor. | |
| virtual void | setVertexShaderSource (const char *source) |
| Sets vertex shader source for this post-processor. | |
| virtual void | setFragmentShaderFile (const std::string &fileName) |
| Sets fragment shader file for this post-processor. | |
| virtual void | setVertexShaderFile (const std::string &fileName) |
| Sets vertex shader file for this post-processor. | |
| virtual void | setInputTexture (const DtChannel *channel, osg::Texture2D *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. | |
| virtual osg::Texture2D * | outputTexture () |
| Gets the output texture of this post processor, for use in chaining processors together. | |
| 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. | |
| virtual osg::Camera * | cameraForChannel (const DtChannel *channel) |
| Gets the Camera node associated with this effect and channel. | |
| virtual void | releaseGLObjects () |
| virtual bool | hasEffect (const std::string &effect) |
| Does this post processor support this effect? | |
| virtual bool | effectEnabled (const std::string &effect) |
| Is this effect (post processor sub-component) enabled? | |
| virtual bool | anyEffectEnabled () |
| Are any effects enabled? | |
| virtual std::list< std::string > | supportedEffects () |
| Get a list of supported effects for this post processor. | |
| virtual bool | handles2D () const |
| Retrieves whether this post processor should be used in 2D orthographic views, as specified in its constructor. | |
| virtual const std::string & | type () const |
| Gets the type of the post processor. | |
| virtual bool | postProcessorEnabled () const |
| Is this post processor enabled? | |
| virtual bool | enableEffect (const std::string &effect) |
| Enable a particular post processing technique For example, "wateroncamera" has techniques "rainsplash", "oceanspray", and "wavesplash". | |
| virtual bool | disableEffect (const std::string &effect) |
| virtual void | enablePostProcessor () |
| Enable or disable the post processor. | |
| 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(%) | |
Protected Member Functions | |
| virtual void | initialize () |
| void | clearNormalMap () |
| void | updateAndDrawDrops (double elapsedTime) |
| void | addRaindrops (double time, float heading, float observerVelocity) |
| void | addSpray (double time, float heading) |
| void | clearDrops () |
| void | reset () |
| void | setActiveStatus () |
| void | slot_windowRemoved (DtWindow *window) |
| void | slot_waterOnScreenSizeChanged (double value) |
Protected Member Functions inherited from makVrv::DtPostProcessor | |
| virtual bool | effectItrEnabled (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. | |
| virtual void | setEnablePostProcessor (bool enabled) |
| Set the post processor enabled state (true = enabled) | |
Static Protected Attributes | |
| static double | myWaterOnScreenSize |
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.
| void makVrv::DtWaterOnScreen::activateRaindrops | ( | bool | on | ) |
Activates or deactivates the raindrops-on-screen effect.
| void makVrv::DtWaterOnScreen::activateSplashes | ( | bool | on | ) |
Activates or deactivates the splashes on screen effect.
(From a submerging observer.)
| void makVrv::DtWaterOnScreen::activateSpray | ( | bool | on | ) |
Activates or deactivates ocean spray on screen effect.
| void makVrv::DtWaterOnScreen::setIsUnderwater | ( | bool | underwater | ) |
Tells effect we are underwater, and no screen effects should exist.
| void makVrv::DtWaterOnScreen::addRainDrop | ( | float | x, |
| float | y, | ||
| float | radius | ||
| ) |
Add a single raindrop.
All parameters are normalized against the viewport dimensions (0-1)
| void makVrv::DtWaterOnScreen::addOceanSplash | ( | float | intensity | ) |
Adds one frame's worth of large splashes on the screen, in response to a submerging or surfacing viewpoint.
| void makVrv::DtWaterOnScreen::setSplashIntensity | ( | float | intensity | ) |
Sets the overall intensity of the splash effect (0-1)
| void makVrv::DtWaterOnScreen::setSprayIntensity | ( | float | intensity | ) |
Sets the overall intensity of the spray effect (0-1)
Called once per frame from the DtPostProcessManager.
Implements makVrv::DtPostProcessor.
| int makVrv::DtWaterOnScreen::getNumActiveDrops | ( | ) | const |
How many drops are currently on the screen.
| void makVrv::DtWaterOnScreen::setWaterOnScreenSize | ( | double | size | ) |
Set the size of the water on screen effect(Rain Splash / Ocean Spray / Wave Splash) in percentage, default is 100(%)
|
static |
Get the size of the water on screen effect(Rain Splash / Ocean Spray / Wave Splash) in percentage, default is 100(%)
| void makVrv::DtWaterOnScreen::addSplashEffects | ( | const DtObserverObject * | observer, |
| bool | hasWaveSplashEffect | ||
| ) |
Query the DtOsgSkyObject, DtTritonManager, and channel observer to determine whether to draw screen space ocean splash effects.
| void makVrv::DtWaterOnScreen::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)
|
protectedvirtual |
Reimplemented from makVrv::DtPostProcessor.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |