Class SoNode
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.inventor.nodes.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
,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
,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
public class SoNode extends SoFieldContainer
Abstract base class for all database nodes. This is the abstract base class from which all scene graph node classes are derived.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 currentSoOutput
.- See Also:
SoPath
,SoAction SoNodeKit
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoNode.RenderModes
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
affectsState()
Returns true if a node has an effect on the state during traversal.void
callback(SoCallbackAction action)
SoNode
copy()
Calls copy(false).SoNode
copy(boolean copyConnections)
Creates and returns an exact copy of the node.void
distribute(SoDistributeAction action)
void
doAction(SoAction action)
SoNode
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
getByName(java.lang.String name)
A node's name can be set usingSoBase.setName()
.void
getMatrix(SoGetMatrixAction action)
void
getPrimitiveCount(SoGetPrimitiveCountAction action)
SoNode.RenderModes
getRenderEngineMode()
Returns the supported Render engine mode.int
getRenderUnitID()
void
GLRender(SoGLRenderAction action)
void
GLRenderBelowPath(SoGLRenderAction action)
void
GLRenderInPath(SoGLRenderAction action)
void
GLRenderOffPath(SoGLRenderAction action)
void
grabEventsCleanup()
void
grabEventsSetup()
void
handleEvent(SoHandleEventAction action)
boolean
isBoundingBoxIgnoring()
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
isOverride()
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 Detail
-
getRenderEngineMode
public SoNode.RenderModes 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
public SoNode copy()
Calls copy(false).
-
distribute
public void distribute(SoDistributeAction action)
-
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
,SoFont
,SoFullSceneAntialiasing
,SoLightModel
,SoMaterial
,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
public SoNode copy(boolean copyConnections)
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
public void getPrimitiveCount(SoGetPrimitiveCountAction action)
-
search
public void search(SoSearchAction action)
-
rayPick
public void rayPick(SoRayPickAction action)
-
pick
public void pick(SoPickAction action)
-
handleEvent
public void handleEvent(SoHandleEventAction action)
-
getByName
public static SoNode getByName(java.lang.String name)
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
public void write(SoWriteAction action)
-
grabEventsSetup
public void grabEventsSetup()
-
isBoundingBoxIgnoring
public boolean isBoundingBoxIgnoring()
-
GLRenderOffPath
public void GLRenderOffPath(SoGLRenderAction action)
-
doAction
public void doAction(SoAction action)
-
getRenderUnitID
public int getRenderUnitID()
-
GLRender
public void GLRender(SoGLRenderAction action)
-
callback
public void callback(SoCallbackAction action)
-
grabEventsCleanup
public void grabEventsCleanup()
-
getMatrix
public void getMatrix(SoGetMatrixAction action)
-
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
public void GLRenderBelowPath(SoGLRenderAction action)
-
getAlternateRep
public SoNode 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). 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
public void getBoundingBox(SoGetBoundingBoxAction action)
-
GLRenderInPath
public void GLRenderInPath(SoGLRenderAction action)
-
-