Depth buffer parameters node. More...
#include <Inventor/nodes/SoDepthBuffer.h>
Public Types | |
enum | DepthWriteFunction { NEVER = SoDepthBufferElement::NEVER, LESS = SoDepthBufferElement::LESS, EQUAL = SoDepthBufferElement::EQUAL, LEQUAL = SoDepthBufferElement::LEQUAL, GREATER = SoDepthBufferElement::GREATER, NOTEQUAL = SoDepthBufferElement::NOTEQUAL, GEQUAL = SoDepthBufferElement::GEQUAL, ALWAYS = SoDepthBufferElement::ALWAYS } |
Public Member Functions | |
virtual SoType | getTypeId () const |
SoDepthBuffer () | |
virtual void | setOverride (const SbBool state) |
virtual SbBool | isOverride () const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFBool | test |
SoSFBool | write |
SoSFEnum | function |
SoSFVec2f | range |
SoSFBool | clearBuffer |
This class specifies the depth buffer parameters used for rendering, including:
It can also be used to clear the depth buffer by setting the clearBuffer field to true.
To control whether frame buffer color components are written or not, see SoColorMask.
Limitations:
test | TRUE |
write | TRUE |
function | LESS |
range | (0.0,1.0) |
clearBuffer | FALSE |
SoPolygonOffset, SoDepthOffset, SoColorMask, SoGLRenderAction
Depth function mode as defined by OpenGL.
SoDepthBuffer::SoDepthBuffer | ( | ) |
Constructor.
static SoType SoDepthBuffer::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoNode.
virtual SoType SoDepthBuffer::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoNode.
virtual SbBool SoDepthBuffer::isOverride | ( | ) | const [inline, virtual] |
Returns the state of the override flag. .
Reimplemented from SoNode.
virtual void SoDepthBuffer::setOverride | ( | const SbBool | state | ) | [inline, virtual] |
Turns the override flag on or off.
The following property nodes are affected by the override flag: SoBaseColor, SoColorIndex, SoComplexity, SoDepthBuffer, SoDrawStyle, SoEnvironment, SoFont, SoFullSceneAntialiasing, SoLightModel, SoMaterial, SoMaterialBinding, SoPackedColor, SoPattern, SoPickStyle, SoPolygonOffset, SoShapeHints, SoVertexProperty, SoTextProperty.
Every node has an override flag associated with it. The override flag is a powerful mechanism typically used (sparingly) near the top of a scene graph. When this flag is set, any nodes of the same type encountered later in the graph are ignored even if they also have their own override flag set. For example, you might insert a line-style SoDrawStyle node at the top of a graph to ensure that the whole scene is drawn as wireframe objects, regardless of drawing styles specified lower in the scene graph. Use the setOverride() method to set and reset the override flag. The isOverride() method returns the state of the override flag.Normally, the override flag is not used within a scene graph for modeling. Use it in applications where you need to specify a temporary change to the whole graph.Note: The override flag is not written to a file.Setting the override flag on a node whose field values are not inherited (for example on a sphere with a radius of 7) has no effect on other nodes in the graph of that type. .
Reimplemented from SoNode.
If true, the depth buffer is cleared when the node is traversed.
The extent of the buffer that is actually cleared may be limited using an SoViewportClipping node. Default is FALSE.
Note: Be careful when using this feature along with a transparency mode other than SoGLRenderAction::NO_SORT because the objects rendering order might be different from their ordering in the scene graph.
NOTE: field available since Open Inventor 8.6Depth comparison function to use (glDepthFunc).
Use enum DepthWriteFunction. Default is LESS.
Value range for the depth buffer (glDepthRange).
Default is [0.0-1.0]. The range will be clamped to [0.0-1.0] by OpenGL.
Enable depth buffer testing (glEnable).
Default is TRUE.
Note that disabling depth testing will prevent the depth buffer from being updated even if depth buffer writing is set to TRUE.
Enable depth buffer writing (glDepthMask).
Default is TRUE.