Package com.openinventor.inventor.nodes
Class SoTransformProjection
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.misc.SoBase
com.openinventor.inventor.fields.SoFieldContainer
com.openinventor.inventor.nodes.SoNode
com.openinventor.inventor.nodes.SoProjection
com.openinventor.inventor.nodes.SoTransformProjection
- All Implemented Interfaces:
SafeDisposable
Scale/recenter projection node.
This property node is a specific
SoProjection
which applies a scale and recenter to a geometry.
The computation is done on the CPU before the transfer to OpenGL. The main purpose of this feature is to transform the vertex coordinates before sending them to OpenGL in order to avoid single precision issues, especially with the depth buffer.
Essentially this is a convenience node that automatically creates an SbTransformProjection
and calls the setProjection()
method for you.
The result of a bounding box action is the coordinates of the bounding box after the projection because we need this version of the bounding box for rendering/clipping.
See SoProjection
for important limitations of projection nodes.
File format/default:
TransformProjection {
parameters | "" |
matrix | identity |
isOn | true |
floatParameters | 1 |
projTypeId | 0 |
scaleFactor | 1.0 |
centerPosition | 0.0 0.0 0.0 |
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SoSFVec3f
Translation applied to the geometry.final SoSFFloat
Scale factor applied to the geometry.Fields inherited from class com.openinventor.inventor.nodes.SoProjection
floatParameters, isOn, matrix, parameters, parametersIn, projTypeId
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.openinventor.inventor.nodes.SoProjection
addProjection, checkProjection, getProjection, setProjection
Methods inherited from class com.openinventor.inventor.nodes.SoNode
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
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
scaleFactor
Scale factor applied to the geometry.
Note: Each coordinate is multiplied by this value. -
centerPosition
Translation applied to the geometry.
Note: This value is subtracted from each coordinate.
-
-
Constructor Details
-
SoTransformProjection
public SoTransformProjection()Constructor.
-