Click or drag to resize
SoWinViewerSetCameraSceneGraph Method

Sets the sub-scene graph to be used for OIV.Inventor.Win.Viewers.SoWinViewer.ViewAll() computation.

Namespace: OIV.Inventor.Win.Viewers
Assembly: OIV.Inventor.Win (in OIV.Inventor.Win.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public void SetCameraSceneGraph(
	SoNode cameraSceneGraph
)

Parameters

cameraSceneGraph
Type: OIV.Inventor.NodesSoNode
Remarks

If this sub-scene graph contains a camera, this camera will be used as the viewer camera. Otherwise the first camera of the scene graph will be used. If no camera is found, the viewer will create its own above the root.

When OIV.Inventor.Win.Viewers.SoWinViewer.ViewAll() computes the bounding box that will be used for determining where to position the camera, it will base its computation on this sub-scene graph rather than on the entire scene graph.

It is useful to specify a sub-scene graph when, for instance, you are using a second camera in the scene, followed by annotation. With this method you can exclude the annotation from the viewAll bounding box computation. Note that since Open Inventor 8.0 you can also exclude portions of the scene graph from the bounding box computation using an OIV.Inventor.Nodes.SoBBox node.

This method can also be useful when using PoView/PoSceneView. As the viewer uses the first camera it finds, it could find the camera of a PoView/PoSceneView. The bounding box would be computed based on the sub-scene graph owned by this PoView/PoSceneView. Thus the global bounding box of the whole scene would be wrong, causing some clipping problems when viewing.

See Also