OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
MWRender::UnderwaterSwitchCallback Class Reference

Hides the node subgraph if the eye point is below water. More...

Inheritance diagram for MWRender::UnderwaterSwitchCallback:
Collaboration diagram for MWRender::UnderwaterSwitchCallback:

Public Member Functions

 UnderwaterSwitchCallback (CameraRelativeTransform *cameraRelativeTransform)
 
virtual void operator() (osg::Node *node, osg::NodeVisitor *nv)
 
void setEnabled (bool enabled)
 
void setWaterLevel (float waterLevel)
 

Private Attributes

osg::ref_ptr
< CameraRelativeTransform
mCameraRelativeTransform
 
bool mEnabled
 
float mWaterLevel
 

Detailed Description

Hides the node subgraph if the eye point is below water.

Note
Must be added as cull callback.
Meant to be used on a node that is child of a CameraRelativeTransform. The current eye point must be retrieved by the CameraRelativeTransform since we can't get it anymore once we are in camera-relative space.

Constructor & Destructor Documentation

MWRender::UnderwaterSwitchCallback::UnderwaterSwitchCallback ( CameraRelativeTransform cameraRelativeTransform)
inline

Member Function Documentation

virtual void MWRender::UnderwaterSwitchCallback::operator() ( osg::Node *  node,
osg::NodeVisitor *  nv 
)
inlinevirtual
void MWRender::UnderwaterSwitchCallback::setEnabled ( bool  enabled)
inline
void MWRender::UnderwaterSwitchCallback::setWaterLevel ( float  waterLevel)
inline

Member Data Documentation

osg::ref_ptr<CameraRelativeTransform> MWRender::UnderwaterSwitchCallback::mCameraRelativeTransform
private
bool MWRender::UnderwaterSwitchCallback::mEnabled
private
float MWRender::UnderwaterSwitchCallback::mWaterLevel
private

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