Class SoNode
- All Implemented Interfaces:
SafeDisposable
- Direct Known Subclasses:
MoActionNode
,OrthoSliceBorder
,PoNode
,Ruler
,SoAlphaPolicy
,SoAnnoText3Property
,SoBackground
,SoBaseColor
,SoBaseKit
,SoBBox
,SoBevelProperty
,SoCallback
,SoCamera
,SoClipPlane
,SoColorIndex
,SoColorMap
,SoColorMask
,SoComplexity
,SoComputeShaderScheduler
,SoCoordinate3
,SoCoordinate4
,SoDataCompositor
,SoDataRange
,SoDataSet
,SoDataSetId
,SoDepthBuffer
,SoDepthOffset
,SoDrawStyle
,SoEdgeFlag
,SoEnvironment
,SoEnvironmentMap
,SoEventCallback
,SoFile
,SoFont
,SoFullSceneAntialiasing
,SoGeometryPriority
,SoGeoOrigin
,SoGeoRender
,SoGroup
,SoHardwareQuery
,SoInfo
,SoInteractiveComplexity
,SoLabel
,SoLight
,SoLightModel
,SoMarker
,SoMaterial
,SoMaterialBinding
,SoNodeKitListPart
,SoNormal
,SoNormalBinding
,SoNurbsBoundary
,SoNurbsProperty
,SoOffscreenVolumeRender
,SoPackedColor
,SoPattern
,SoPhysicalMaterial
,SoPickStyle
,SoPolygonOffset
,SoProfile
,SoProfileCoordinate2
,SoProfileCoordinate3
,SoProjection
,SoRemoteVizClient
,SoRenderToTextureProperty
,SoROI
,SoScreenDrawer
,SoShaderObject
,SoShaderParameter
,SoShaderProgram
,SoShadowStyle
,SoShape
,SoShapeHints
,SoTextProperty
,SoTexture
,SoTexture2Transform
,SoTexture3Transform
,SoTextureCombiner
,SoTextureCoordinate2
,SoTextureCoordinate3
,SoTextureCoordinateBinding
,SoTextureCoordinateFunction
,SoTextureMatrix
,SoTextureUnit
,SoTransferFunction
,SoTransformation
,SoVertexFlag
,SoVertexProperty
,SoViewingCube
,SoViewport
,SoViewportClipping
,SoVolumeDataDrawStyle
,SoVolumeRenderingPhysicalQuality
,SoVolumeTransform
,SoWWWInline
File format/default:
This is an abstract class. See the reference page of a derived class for the format and default values.
Action behavior:
SoSearchAction
If the node, type, or name matches the search criteria, returns a path to the node.
SoWriteAction
Writes the contents of the node to the current SoOutput
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Defines the list of supported render mode for a custom node.Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if a node has an effect on the state during traversal.void
callback
(SoCallbackAction action) copy()
Calls copy(false).copy
(boolean copyConnections) Creates and returns an exact copy of the node.void
distribute
(SoDistributeAction action) void
getAlternateRep
(SoAction action) This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type).void
getBoundingBox
(SoGetBoundingBoxAction action) static SoNode
A node's name can be set usingSoBase.setName()
.void
getMatrix
(SoGetMatrixAction action) void
Returns the supported Render engine mode.int
void
GLRender
(SoGLRenderAction action) void
GLRenderBelowPath
(SoGLRenderAction action) void
GLRenderInPath
(SoGLRenderAction action) void
GLRenderOffPath
(SoGLRenderAction action) void
void
void
handleEvent
(SoHandleEventAction action) boolean
This method is used by getBoundingBox action traversal to know if the current node must be traversed or not, ie the bounding should be ignored.boolean
Returns the state of the override flag.void
pick
(SoPickAction action) void
rayPick
(SoRayPickAction action) void
search
(SoSearchAction action) void
setOverride
(boolean state) Turns the override flag on or off.void
touch()
Marks an instance as modified, simulating a change to it.void
write
(SoWriteAction action) 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
-
Method Details
-
getRenderEngineMode
Returns the supported Render engine mode.For custom node, this method returns by default
SoNode.RenderModes.OIV_UNKNOWN_RENDERING_MODE
, override this method to specify the Render engine mode supported by your custom node.- Returns:
- the supported Render engine mode for this node.
-
copy
Calls copy(false). -
distribute
-
setOverride
public void setOverride(boolean state) Turns the override flag on or off.
The following property nodes are affected by the override flag:SoBaseColor
,SoColorIndex
,SoComplexity
,SoDepthBuffer
,SoDrawStyle
,SoEnvironment
,SoEnvironmentMap
,SoFont
,SoFullSceneAntialiasing
,SoLightModel
,SoMaterial
,SoPhysicalMaterial
,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-styleSoDrawStyle
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 thesetOverride()
method to set and reset the override flag. TheisOverride()
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.
-
isOverride
public boolean isOverride()Returns the state of the override flag. -
copy
Creates and returns an exact copy of the node. If the node is a group, it copies the children as well. If copyConnections is true (it is false by default), any connections to (but not from) fields of the node are copied, as well. Note that multiple references to a node under the node to be copied will result in multiple references to the copy of that node. To be copyable, a custom node must define a default contructor. Note that OIV require that every custom node must define a default contructor.Please also note that instance data other than Inventor fields and public children will not be copied by this method. If extra data needs to be copied as well, this method will have to be manually overridden.
-
affectsState
public boolean affectsState()Returns true if a node has an effect on the state during traversal. The default method returns true. Node classes (such asSoSeparator
) that isolate their effects from the rest of the graph override this method to return false. -
getPrimitiveCount
-
search
-
rayPick
-
pick
-
handleEvent
-
getByName
A node's name can be set usingSoBase.setName()
. This method allows nodes to be looked up by name. It returns the last node given the specified name. -
write
-
grabEventsSetup
public void grabEventsSetup() -
isBoundingBoxIgnoring
public boolean isBoundingBoxIgnoring() -
GLRenderOffPath
-
doAction
-
getRenderUnitID
public int getRenderUnitID() -
GLRender
-
callback
-
grabEventsCleanup
public void grabEventsCleanup() -
getMatrix
-
touch
public void touch()Marks an instance as modified, simulating a change to it. This will notify auditors (parent nodes, connected engines, and so on) of a change to this object and cause attached sensors to be triggered. -
GLRenderBelowPath
-
getAlternateRep
This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type). For example, when anSoIndexedTexture2
node is traversed by anSoToU3DAction
, it returns anSoTexture2
node as its alternate representation, because indexed textures are not supported in U3D. A custom node can use this mechanism to provide an alternate representation using standard nodes when it is travered by anSoWriteAction
.By default the node itself is returned.
-
getBoundingBox
-
GLRenderInPath
-