#include <Inventor/nodes/SoPolygonOffset.h>
Inheritance diagram for SoPolygonOffset::
Public Types | |
enum | Style { FILLED = SoPolygonOffsetElement::FILLED, LINES = SoPolygonOffsetElement::LINES, POINTS = SoPolygonOffsetElement::POINTS } |
Public Methods | |
SoPolygonOffset (void) | |
virtual void | doAction (SoAction *action) |
virtual void | callback (SoCallbackAction *action) |
virtual void | GLRender (SoGLRenderAction *action) |
Static Public Methods | |
void | initClass (void) |
Public Attributes | |
SoSFFloat | factor |
SoSFFloat | units |
SoSFBitMask | styles |
SoSFBool | on |
Protected Methods | |
virtual | ~SoPolygonOffset () |
A common problem with realtime 3D rendering systems is that rendered primitives which are at approximately the same depth with regard to the camera viewpoint will appear to flicker. I.e.: from one angle one primitive will appear to be closer, while at another angle, another primitive will appear closer. When this happens, the rendered graphics at that part of the scene will of course look a lot less visually pleasing.
One common situation where this problem often occurs is when you attempt to put a wireframe grid as an outline on top of filled polygons.
The cause of the problem described above is that the Z-buffer of any render system has a limited resolution, often at 16, 24 or 32 bits. Because of this, primitives which are close will sometimes get the same depth value in the Z-buffer, even though they are not actually at the same depth-coordinate.
To rectify the flickering problem, this node can be inserted in the scene graph at the proper place(s) to explicitly define how polygons, lines and/or points should be offset with regard to other primitives.
This node class is an extension versus the original SGI Inventor v2.1 API. In addition to being a Coin extension, it is also present in TGS' Inventor implementation (with the same API).
|
Enumeration of the rendering primitives which can be influenced by an SoPolygonOffset node. |
|
Constructor. |
|
Destructor. |
|
Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system. Reimplemented from SoNode. |
|
This function performs the typical operation of a node for any action. Reimplemented from SoNode. |
|
Action method for SoCallbackAction. Simply updates the state according to how the node behaves for the render action, so the application programmer can use the SoCallbackAction for extracting information about the scene graph. Reimplemented from SoNode. |
|
Action method for the SoGLRenderAction. This is called during rendering traversals. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method. Reimplemented from SoNode. |
|
Offset multiplication factor. |
|
Absolute offset translation value. |
|
The rendering primitive type to be influenced by this node. Defaults to SoPolygonOffset::FILLED. |
|
Whether the offset is on or off. Default is for SoPolygonOffset::on to be |