public class SoPolygonOffset extends SoNode
NOTE: SoPolygonOffset
, as its name implies, only works with polygonal geometry.
SoPolygonOffset
affects filled primitives such as SoFaceSet
and SoTriangleStripSet
. It also affects lines and points in the limited sense that it affects polygonal primitives when the draw style is set to LINES or POINTS. However, because polygon offset does not affect non-polygonal geometry, primitives such as SoLineSet
and SoPointSet
cannot be offset with SoPolygonOffset()
. To avoid depth buffer artifacts with mixed polygonal and non-polygonal geometry, you should "push" the polygonal geometry away from the camera.
Note: There is only one offset value (combination of factor
and units
) in the traversal state at any given time.
The value of the offset is factor * z + r * units
, where
So units produces a constant depth offset and factor produces a variable depth offset which is zero when a polygon is perpendicular to the view vector (parallel to the view plane) and increases as the depth slope increases.
Both factor and units may be either positive or negative. A positive offset value pushes primitives away from the camera and a negative value pulls them closer. Generally a small value, like 1.0, is sufficient for both parameters.
File format/default:
PolygonOffset {
factor | 1 |
units | 100 |
styles | FILLED |
on | true |
Action behavior:
SoGLRenderAction
Calls glPolygonOffset and enables or disables the polygon offset feature as specified. Sets: SoPolyonOffsetElement.
See also:
Modifier and Type | Class and Description |
---|---|
static class |
SoPolygonOffset.StyleType
Offset style.
|
SoNode.RenderModes
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFFloat |
factor
Specifies a scale factor that is used to create a variable depth offset for each polygon.
|
SoSFBool |
on
Enables/disables polygon offset.
|
SoSFBitMask<SoPolygonOffset.StyleType> |
styles
A bit-wise combination of FILLED, LINES, and POINTS that determines which polygon modes should be offset.
|
SoSFFloat |
units
Is multiplied by an OpenGL implementation-specific value to create a constant depth offset.
|
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoPolygonOffset()
Constructor.
|
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
getNativeResourceHandle
public final SoSFFloat factor
SoDepthOffset
). Default = 1.0.public final SoSFFloat units
SoDepthOffset
). Default = 100.0.public final SoSFBitMask<SoPolygonOffset.StyleType> styles
public final SoSFBool on
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com