Click or drag to resize
SoCameraViewAll Method (SoNode, SbViewportRegion, Single)

Sets the camera to view the scene rooted by the given node.

Namespace: OIV.Inventor.Nodes
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public void ViewAll(
	SoNode sceneRoot,
	SbViewportRegion vpRegion,
	float slack
)

Parameters

sceneRoot
Type: OIV.Inventor.NodesSoNode
vpRegion
Type: OIV.InventorSbViewportRegion
slack
Type: SystemSingle
Remarks

The near and far clipping planes will be positioned slack bounding sphere radii away from the bounding box's center. A value of 1.0 will make the near and far clipping planes the tightest around the bounding sphere.

The node applies an OIV.Inventor.Actions.SoGetBoundingBoxAction to the scene graph to get the bounding box of the entire scene. The bounding box will only include shapes that are actually traversed. For example the bounding box will not include shapes under an OIV.Inventor.Nodes.SoSwitch with whichChild set to SO_SWITCH_NONE. The action does not consider the visibility of shapes that are traversed. In other words the bounding box will include shapes that are invisible (OIV.Inventor.Nodes.SoDrawStyle), shapes that are clipped (OIV.Inventor.Nodes.SoClipPlane), etc. Use an OIV.Inventor.Nodes.SoBBox node to exclude shapes from the bounding box computation. Bounding boxes are automatically cached at OIV.Inventor.Nodes.SoSeparator nodes, so getting the bounding box is very fast when the scene graph has not been changed.

See Also