Class SoRenderToTextureProperty
- 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.SoRenderToTextureProperty
-
- All Implemented Interfaces:
SafeDisposable
public class SoRenderToTextureProperty extends SoNode
Class for creating a texture by rendering a scene graph. This class is used to define an image for texture mapping which is created by rendering a scene graph.It can be used with the classes
SoTexture2
andSoTextureCubeMap
. Create theSoRenderToTextureProperty
node and assign it to the renderToTextureProperty field of the texture mapping node.The
SoRenderToTarget
node can also be used to create texture images.One of the two fields, node or path, must be defined.
The scene graph should normally contain a camera and at least one light. Unlike
SoRenderToTarget
, the children ofSoRenderToTextureProperty
do not inherit the camera, lights, etc from the main scene graph.Note that the default image size is 0,0 (effectively disables rendering).
File format/default:
RenderToTextureProperty {
node [] path "" updatePolicy WHEN_NEEDED backgroundColor 0 0 0 size 0 0 component RGB - See Also:
SoTexture2
,SoTextureCubeMap
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoRenderToTextureProperty.Components
Rendering component enumeration values.static class
SoRenderToTextureProperty.UpdatePolicies
Update Policy enumeration values.-
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
Fields Modifier and Type Field Description SoSFColor
backgroundColor
Background color used when rendering the scene graph.SoSFEnum<SoRenderToTextureProperty.Components>
component
Specifies the type of component(s) for the rendering.SoMFNode
node
Specifies the scene graph(s) (SoNode(s)
) to be rendered into the texture.SoMFPath
path
Specifies the scene graph(s) (SoPath(s)
) to be rendered into the texture.SoSFVec2s
size
Size in pixels of the rendered texture.SoSFTrigger
trigger
Trigger field to render the scene into the Pbuffer.SoSFEnum<SoRenderToTextureProperty.UpdatePolicies>
updatePolicy
Specifies the policy for rendering to the texture.-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoRenderToTextureProperty()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SoGLRenderAction
getGLRenderAction()
Returns the render action used for rendering the scene.void
setContextForSharing(SoGLContext name_20868)
Deprecated.As of Open Inventor 10000.void
setGLRenderAction(SoGLRenderAction ra)
Specifies a custom render action to use for rendering the scene.-
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 Detail
-
node
public final SoMFNode node
Specifies the scene graph(s) (SoNode(s)
) to be rendered into the texture. For use withSoTexture2
, only one scene graph should be specified. For use with SoTextureCube map, six scene graphs must be specified, one for each face of the cube in the order:- imagePosX (left)
- imageNegX (right)
- imagePosY (bottom)
- imageNegY (top)
- imagePosZ (back)
- imageNegZ (front)
The node field has priority over the path field. Null by default.
-
path
public final SoMFPath path
Specifies the scene graph(s) (SoPath(s)
) to be rendered into the texture. For use withSoTexture2
, only one path should be specified. For use with SoTextureCube map, six paths must be specified, one for each face of the cube in the order:- imagePosX (left)
- imageNegX (right)
- imagePosY (bottom)
- imageNegY (top)
- imagePosZ (back)
- imageNegZ (front)
The node field has priority over the path field. Null by default.
-
updatePolicy
public final SoSFEnum<SoRenderToTextureProperty.UpdatePolicies> updatePolicy
Specifies the policy for rendering to the texture. Use enumUpdatePolicy
. Default is WHEN_NEEDED.
-
backgroundColor
public final SoSFColor backgroundColor
Background color used when rendering the scene graph. Black by default.
-
size
public final SoSFVec2s size
Size in pixels of the rendered texture. (0, 0) by default.
-
component
public final SoSFEnum<SoRenderToTextureProperty.Components> component
Specifies the type of component(s) for the rendering. Use enumComponent
. Default is RGB.
-
trigger
public final SoSFTrigger trigger
Trigger field to render the scene into the Pbuffer. Effective only if updatePolicy is ON_TRIGGER.
-
-
Method Detail
-
setContextForSharing
@Deprecated public void setContextForSharing(SoGLContext name_20868)
Deprecated.As of Open Inventor 10000. No more used. Related to deprecated PBuffer implementation.Warning Deprecated since Open Inventor 10000. No more used. Related to deprecated PBuffer implementation.
-
getGLRenderAction
public SoGLRenderAction getGLRenderAction()
Returns the render action used for rendering the scene.
-
setGLRenderAction
public void setGLRenderAction(SoGLRenderAction ra)
Specifies a custom render action to use for rendering the scene.
-
-