Class SoSceneKit
- java.lang.Object
 
- 
- All Implemented Interfaces:
 SafeDisposable
public class SoSceneKit extends SoBaseKit
Scene nodekit class. This nodekit is used to organize camera, (SoCameraKit), light, (SoLightKit), and object, (SoShapeKit,SoSeparatorKit, andSoWrapperKit) nodekits into a scene. A scene is composed of a list of cameras, a list of lights, and a list of children. There are three parts created by this nodekit: cameraList , lightList , and childList .The cameraList part is a list part of
SoCameraKitnodes. The list itself is anSoNodeKitListPart, and since only one camera can be active at a time, the container of the list part is anSoSwitchnode. UsesetCameraNumber(), and the scene kit will set the switch to make that camera active.The lightList part is a list of
SoLightKitnodes. The lightList is used to illuminate the objects contained in the childList part.The childList part contains a set of
SoSeparatorKitnodes. You can add any kind ofSoSeparatorKitto this list, includingSoShapeKitandSoWrapperKit. Since eachSoSeparatorKitin turn contains a childList , this part is used to describe a hierarchical scene. (See the reference page forSoSeparatorKit). All members of childList are lit by the lights in lightList and rendered by the active camera in cameraList .NOTES:
- By default the viewer will not find the camera inside the 
SoCameraKit. To allow the viewer to find this camera the application must explicitly allow searching inside nodekits by calling theSoBaseKitstatic method setSearchingChildren. If the viewer does not find a camera in the scene graph it will create one automatically and attach to the created one. - If the viewer does find the camera inside the 
SoCameraKit, the viewer will not call its viewAll() method automatically. The application must make this call.PARTS (
SoNodeKitListPart) cameraList
This part is anSoNodeKitListPartIt has a container that is anSoSwitchnode. The list may contain onlySoCameraKitnodekits. The active child of theSoSwitchis the active camera. This part is NULL by default, but is automatically created whenever you add a camera, as with setPart("cameraList[0]", myNewCamera) .(
SoNodeKitListPart) lightList
This part is anSoNodeKitListPartthat uses an defines anSoGroupas its container The list may contain onlySoLightKitnodekits. Add SoLightKits to this list and they will light the members of the childList of thisSoSceneKit. This part is NULL by default, but is automatically created when you add a light.(
SoNodeKitListPart) childList
This part is anSoNodeKitListPartthat uses anSoGroupfor its container. The list may contain onlySoSeparatorKitnodekits or nodekits derived fromSoSeparatorKit(e.g.,SoShapeKitandSoWrapperKit). These children represent the objects in the scene. This part is NULL by default, but is automatically created whenever you add a child to the childList. Also, when asked to build a member of the childList, the scenekit will build anSoShapeKitby default. So if the childList part is NULL, and you call: getPart("childList[0]", true) . the scene kit will create the childList and add anSoShapeKitas the new element in the list. 
File format/default:
SceneKit {
callbackList NULL cameraList NodeKitListPart { containerTypeName "Switch" childTypeNames "CameraKit" containerNode Switch { whichChild 0 CameraKit { camera PerspectiveCamera {} } } } lightList NULL childList NULL CATALOG PARTS All Parts
Part Name Part Type Default Type NULL Default callbackList NodeKitListPart yes cameraList NodeKitListPart yes lightList NodeKitListPart yes childList NodeKitListPart yes Extra Information for List Parts from Above Table
Part Name Container Type Possible Types callbackList Separator Callback, EventCallback  
- 
- 
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
- 
Fields inherited from class com.openinventor.inventor.nodekits.SoBaseKit
boundingBoxIgnoring 
- 
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle 
 - 
 
- 
Constructor Summary
Constructors Constructor Description SoSceneKit()Constructor. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCameraNumber()Gets current camera index.static SoNodekitCataloggetClassNodekitCatalog()Returns theSoNodekitCatalogfor this class.voidsetCameraNumber(int camNum)Sets current camera index.- 
Methods inherited from class com.openinventor.inventor.nodekits.SoBaseKit
getNodekitCatalog, getPart, getPart, getPartString, getViewportIsEnabled, getViewportOrigin, getViewportSize, isSearchingChildren, set, set, setPart, setSearchingChildren 
- 
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, 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
- 
setCameraNumber
public void setCameraNumber(int camNum)
Sets current camera index. This index refers to which child is active in the cameraList part (SoSwitchnode). 
- 
getClassNodekitCatalog
public static SoNodekitCatalog getClassNodekitCatalog()
Returns theSoNodekitCatalogfor this class. 
- 
getCameraNumber
public int getCameraNumber()
Gets current camera index. This index refers to which child is active in the cameraList part (SoSwitchnode). 
 - 
 
 -