OpenSceneGraph 2.8.4
|
Encapsulate OpenGL glDepthFunc/Mask/Range functions. More...
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 ©op=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 (StateAttribute::ModeUsage &usage) const |
Return the modes associated with this StateAttribute. | |
void | setFunction (Function func) |
Function | getFunction () const |
void | setRange (double zNear, double zFar) |
void | setZNear (double zNear) |
double | getZNear () const |
void | setZFar (double zFar) |
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 |
Encapsulate OpenGL glDepthFunc/Mask/Range functions.
enum osg::Depth::Function |
osg::Depth::Depth | ( | Function | func = LESS , |
double | zNear = 0.0 , |
||
double | zFar = 1.0 , |
||
bool | writeMask = true |
||
) |
Copy constructor using CopyOp to manage deep vs shallow copy.
virtual osg::Depth::~Depth | ( | ) | [protected, virtual] |
virtual void osg::Depth::apply | ( | State & | ) | const [virtual] |
apply the OpenGL state attributes.
The render info for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.
Reimplemented from 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.
References COMPARE_StateAttribute_Parameter, and COMPARE_StateAttribute_Types.
Function osg::Depth::getFunction | ( | ) | const [inline] |
virtual bool osg::Depth::getModeUsage | ( | StateAttribute::ModeUsage & | ) | const [inline, virtual] |
Return the modes associated with this StateAttribute.
Reimplemented from osg::StateAttribute.
References osg::StateAttribute::ModeUsage::usesMode().
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] |
void osg::Depth::setZFar | ( | double | zFar | ) | [inline] |
void osg::Depth::setZNear | ( | double | zNear | ) | [inline] |
bool osg::Depth::_depthWriteMask [protected] |
Function osg::Depth::_func [protected] |
double osg::Depth::_zFar [protected] |
double osg::Depth::_zNear [protected] |
![]() | Generated at Sun Jan 8 2012 13:16:08 for the OpenSceneGraph by doxygen 1.7.4. |