Open Inventor Reference
|
Scene nodekit class. More...
#include <Inventor/nodekits/SoSceneKit.h>
Public Member Functions | |
SoSceneKit () | |
Constructor. | |
int | getCameraNumber () |
Gets and sets current camera index. | |
void | setCameraNumber (int camNum) |
Gets and sets current camera index. | |
virtual SbBool | affectsState () const |
Overrides default method on SoNode. | |
Static Public Member Functions | |
static void | initClass () |
Initializes base node class. | |
Protected Member Functions | |
virtual | ~SoSceneKit () |
This nodekit is used to organize camera, (SoCameraKit), light, (SoLightKit), and object, (SoShapeKit, SoSeparatorKit, and SoWrapperKit) 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 SoCameraKit nodes. The list itself is an SoNodeKitListPart, and since only one camera can be active at a time, the container of the list part is an SoSwitch node. Use setCameraNumber(), and the scene kit will set the switch to make that camera active.
The lightList part is a list of SoLightKit nodes. The lightList is used to illuminate the objects contained in the childList part.
The childList part contains a set of SoSeparatorKit nodes. You can add any kind of SoSeparatorKit to this list, including SoShapeKit and SoWrapperKit. Since each SoSeparatorKit in turn contains a childList, this part is used to describe a hierarchical scene. (See the reference page for SoSeparatorKit). All members of childList are lit by the lights in lightList and rendered by the active camera in cameraList.
NULL
by default, but is automatically created whenever you add a camera, as with setPart("cameraList[0]", myNewCamera) . NULL
by default, but is automatically created when you add a light. 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 an SoShapeKit by default. So if the childList part is NULL, and you call: getPart("childList[0]", TRUE) . the scene kit will create the childList and add an SoShapeKit as the new element in the list.Definition at line 116 of file SoSceneKit.h.
SoSceneKit::SoSceneKit | ( | ) |
virtual SoSceneKit::~SoSceneKit | ( | ) | [protected, virtual] |
int SoSceneKit::getCameraNumber | ( | ) |
This index refers to which child is active in the cameraList part (SoSwitch node).
static void SoSceneKit::initClass | ( | ) | [static] |
Reimplemented from SoBaseKit.
void SoSceneKit::setCameraNumber | ( | int | camNum | ) |
This index refers to which child is active in the cameraList part (SoSwitch node).