osg::Depth Class Reference

Encapsulate OpenGL glDepthFunc/Mask/Range functions. More...

Inheritance diagram for osg::Depth:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Function {
  NEVER = GL_NEVER, LESS = GL_LESS, EQUAL = GL_EQUAL, LEQUAL = GL_LEQUAL,
  GREATER = GL_GREATER, NOTEQUAL = GL_NOTEQUAL, GEQUAL = GL_GEQUAL, ALWAYS = GL_ALWAYS
}

Public Member Functions

 Depth (Function func=LESS, double zNear=0.0, double zFar=1.0, bool writeMask=true)
 Depth (const Depth &dp, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 Copy constructor using CopyOp to manage deep vs shallow copy.
 META_StateAttribute (osg, Depth, DEPTH)
virtual int compare (const StateAttribute &sa) const
 return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
virtual bool getModeUsage (ModeUsage &usage) const
void setFunction (Function func)
Function getFunction () const
void setRange (double zNear, double zFar)
double getZNear () const
double getZFar () const
void setWriteMask (bool mask)
bool getWriteMask () const
virtual void apply (State &state) const
 apply the OpenGL state attributes.

Protected Member Functions

virtual ~Depth ()

Protected Attributes

Function _func
double _zNear
double _zFar
bool _depthWriteMask

Detailed Description

Encapsulate OpenGL glDepthFunc/Mask/Range functions.


Member Enumeration Documentation

enum osg::Depth::Function
 

Enumerator:
NEVER 
LESS 
EQUAL 
LEQUAL 
GREATER 
NOTEQUAL 
GEQUAL 
ALWAYS 


Constructor & Destructor Documentation

Depth::Depth Function  func = LESS,
double  zNear = 0.0,
double  zFar = 1.0,
bool  writeMask = true
 

osg::Depth::Depth const Depth dp,
const CopyOp copyop = CopyOp::SHALLOW_COPY
[inline]
 

Copy constructor using CopyOp to manage deep vs shallow copy.

Depth::~Depth  )  [protected, virtual]
 


Member Function Documentation

void Depth::apply State state  )  const [virtual]
 

apply the OpenGL state attributes.

The global state for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.

Implements osg::StateAttribute.

virtual int osg::Depth::compare const StateAttribute sa  )  const [inline, virtual]
 

return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.

Implements osg::StateAttribute.

Function osg::Depth::getFunction  )  const [inline]
 

virtual bool osg::Depth::getModeUsage ModeUsage &  usage  )  const [inline, virtual]
 

bool osg::Depth::getWriteMask  )  const [inline]
 

double osg::Depth::getZFar  )  const [inline]
 

double osg::Depth::getZNear  )  const [inline]
 

osg::Depth::META_StateAttribute osg  ,
Depth  ,
DEPTH 
 

void osg::Depth::setFunction Function  func  )  [inline]
 

void osg::Depth::setRange double  zNear,
double  zFar
[inline]
 

void osg::Depth::setWriteMask bool  mask  )  [inline]
 


Member Data Documentation

bool osg::Depth::_depthWriteMask [protected]
 

Function osg::Depth::_func [protected]
 

double osg::Depth::_zFar [protected]
 

double osg::Depth::_zNear [protected]
 


The documentation for this class was generated from the following files:
Generated at Sat Mar 18 08:52:34 2006 for the OpenSceneGraph by doxygen 1.4.6.