public class PoSceneView extends PoBaseView
Views allow the application to specify multiple cameras, each with its own separate viewport (region of the 3D window). This is more powerful than just using multiple SoCamera nodes, because camera nodes do not allow specifying a viewport (the viewport is always the full window). See PoBaseView for more explanation.
A scene is a set of any nodes (except SoCamera nodes) placed under an SoGroup node which must be seen in a viewport according to a camera configuration. To define a view, set the fields viewportOrigin and viewportSize according to the viewport position and size you want to have (relative to the display window sizes), configure the camera (set the part cameraKit), build the scene under an SoGroup node, and set this scene to the view (set the part scene). All shape nodes contained in the scene will be drawn in the viewport previously defined and according to the camera definition. You can define as many views as you want.
NOTES:
LIMITATIONS:
SoCamera.viewportMapping must be equal to ADJUST_CAMERA in order to have a correct vectorisation when you use HardCopy,
SoBoxHighlightRenderAction class on a scene graph which contains a view,
SoDrawStyle node and setOverride() if necessary.
// Must enable this option or viewer will not be able to find the camera in the PoSceneView nodeKit. SoBaseKit.setSearchingChildren( true ); // First scene graph SoSeparator scene1 = new SoSeparator(); scene1.addChild( new SoCone() ); // First view (lower left quadrant of window) PoSceneView view1 = new PoSceneView(); view1.sensitiveOnEvents( true ); view1.isBorderVisible.setValue( true ); view1.viewportOrigin.setValue( 0, 0 ); view1.viewportSize.setValue( 0.5f, 0.5f ); SoPerspectiveCamera cam1 = new SoPerspectiveCamera(); view1.setPart( "cameraKit.camera", cam1 ); view1.setPart( "scene", scene1 ); cam1.viewAll( scene1, new SbViewportRegion((short)100, (short)100) ); root.addChild( view1 ); // Second scene graph Separator scene2 = new SoSeparator(); scene2.addChild( new SoCube() ); // Second view (upper right quadrant of window) PoSceneView view2 = new PoSceneView(); view2.sensitiveOnEvents( true ); view2.isBorderVisible.setValue( true ); view2.set( "borderApp.drawStyle", "lineWidth 1.5" ); // Work-around for border view2.viewportOrigin.setValue( 0.5f, 0.5f ); view2.viewportSize.setValue( 0.5f, 0.5f ); SoPerspectiveCamera cam2 = new SoPerspectiveCamera(); view2.setPart( "cameraKit.camera", cam2 ); view2.setPart( "scene", scene2 ); cam2.viewAll( scene2, new SbViewportRegion((short)100, (short)100) ); root.addChild( view2 ); viewer.setSceneGraph( root );
File format/default:
| viewportOrigin | 0 0 |
| viewportSize | 1 1 |
| isBackgroundVisible | false |
| isBorderVisible | false |
Inventor.ConstructorCommand| Modifier and Type | Field and Description |
|---|---|
SoSFBool |
isBackgroundVisible
Defines the visibility of the background of the view.
|
SoSFBool |
isBorderVisible
Defines the visibility of the borders of the view.
|
viewportOrigin, viewportSizeboundingBoxIgnoringVERBOSE_LEVEL, ZeroHandle| Constructor and Description |
|---|
PoSceneView()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static SoNodekitCatalog |
getClassNodekitCatalog()
Returns the
SoNodekitCatalog for this class. |
isPointWithinViewport, isSensitiveOnEvents, sensitiveOnEventsgetNodekitCatalog, getPart, getPart, getPartString, getViewportIsEnabled, getViewportOrigin, getViewportSize, isSearchingChildren, set, set, setPart, setSearchingChildrenaffectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, writecopyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, setToDefaultsdispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizablegetAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreadspublic final SoSFBool isBackgroundVisible
public final SoSFBool isBorderVisible
public static SoNodekitCatalog getClassNodekitCatalog()
SoNodekitCatalog for this class.Generated on July 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com