Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

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 Methods

 Depth ()
 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 void getAssociatedModes (std::vector< GLMode > &modes) const
 return the modes associated with this StateSet

void setFunction (const Function func)
const Function getFunction () const
void setWriteMask (const bool mask)
const bool getWriteMask () const
void setRange (const double zNear, const double zFar)
const double getZNear () const
const double getZFar () const
virtual void apply (State &state) const
 apply the OpenGL state attributes.


Protected Methods

virtual ~Depth ()

Protected Attributes

Function _func
bool _depthWriteMask
double _zNear
double _zFar

Detailed Description

Encapsulate OpenGL glDepthFunc/Mask/Range functions.


Member Enumeration Documentation

enum osg::Depth::Function
 

Enumeration values:
NEVER 
LESS 
EQUAL 
LEQUAL 
GREATER 
NOTEQUAL 
GEQUAL 
ALWAYS 


Constructor & Destructor Documentation

osg::Depth::Depth (    ) 
 

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

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osg::Depth::~Depth (    )  [protected, virtual]
 


Member Function Documentation

virtual void osg::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.

virtual void osg::Depth::getAssociatedModes (  std::vector< GLMode > &    modes )  const [inline, virtual]
 

return the modes associated with this StateSet

Reimplemented from osg::StateAttribute.

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

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

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

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

osg::Depth::META_StateAttribute (  osg   ,
Depth   ,
DEPTH   
) 
 

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

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

void osg::Depth::setWriteMask (  const 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 file:
Generated at Wed Sep 18 13:55:27 2002 for the Open Scene Graph by doxygen 1.2.16.