PoBaseView Class Reference
[Views]

VSG extension Abstract base class for views. More...

#include <Inventor/Gui/view/PoBaseView.h>

Inheritance diagram for PoBaseView:
SoBaseKit SoNode SoGetView SoFieldContainer SoBase SoRefCounter SoTypedObject PoSceneView PoView

List of all members.

Public Member Functions

virtual SoType getTypeId () const
virtual const SoNodekitCataloggetNodekitCatalog () const
SbBool isPointWithinViewport (float x, float y) const
void setCamera (SoGuiViewer *viewer)
void sensitiveOnEvents (SbBool flag)
SbBool isSensitiveOnEvents () const

Static Public Member Functions

static SoType getClassTypeId ()
static const SoNodekitCataloggetClassNodekitCatalog ()
static PoBaseViewgetView (SoGuiViewer *viewer, int mouseX, int mouseY)

Public Attributes

SoSFVec2f viewportOrigin
SoSFVec2f viewportSize

Deprecated



static SoDEPRECATED SbBool viewingEventCB (void *viewer, void *anyEvent)

Detailed Description

VSG extension Abstract base class for views.

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).

In addition, when mouse event locations are mapped back into 3D space, Open Inventor automatically uses the view volume of the camera associated with the view whose viewport currently contains the mouse cursor.

Views can be used to efficiently create the effect of multiple windows, without the overhead and system dependent code to manage multiple windows. For example, views can be used to subdivide the window into multiple independent views of a 3D scene or to create an inset "bird's eye" view inside the window.

Basically, a view consists of a camera (specifically an SoCameraKit) and a viewport attached to this camera. The viewport is the region of the graphics window in which the scene graph will be rendered.

NOTES:

LIMITATIONS:

CHANGES:

ACTION BEHAVIOR

SEE ALSO

PoView, PoSceneView


Member Function Documentation

static const SoNodekitCatalog* PoBaseView::getClassNodekitCatalog (  )  [static]

Returns the SoNodekitCatalog for this class.

Reimplemented from SoBaseKit.

Reimplemented in PoSceneView, and PoView.

static SoType PoBaseView::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoBaseKit.

Reimplemented in PoSceneView, and PoView.

virtual const SoNodekitCatalog* PoBaseView::getNodekitCatalog (  )  const [virtual]

Returns the SoNodekitCatalog for this instance.

Reimplemented from SoBaseKit.

Reimplemented in PoSceneView, and PoView.

virtual SoType PoBaseView::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoBaseKit.

Reimplemented in PoSceneView, and PoView.

static PoBaseView* PoBaseView::getView ( SoGuiViewer viewer,
int  mouseX,
int  mouseY 
) [static]

Returns the view (if any) that contains the given mouse cursor position.

If the viewports of multiple views overlap, the chosen view is the last view drawn (i.e. last view node traversed). Only a sensitive view (see sensitiveOnEvents() method) can be selected, others are ignored during the search. (See Chapter 10 of the Open Inventor Mentor, page 266-268, for the method for getting mouse coordinates).

Note: For portability, this method does not take a system dependent viewer class, e.g. SoXtViewer, as its parameter. The SoGuiViewer associated with a viewer can be retrieved using the viewer's getGuiViewer() method.

SbBool PoBaseView::isPointWithinViewport ( float  x,
float  y 
) const

Indicates if a point defined in the normalized space [0-1]x[0-1] is in the viewport of the view.

SbBool PoBaseView::isSensitiveOnEvents (  )  const [inline]

Returns true if the view is sensitive to events.

void PoBaseView::sensitiveOnEvents ( SbBool  flag  )  [inline]

Specifies if the view is sensitive to events.

Default is false.

void PoBaseView::setCamera ( SoGuiViewer viewer  ) 

Sets the camera of the view on the viewer.

(This method is equivalent to: viewer->setCamera(camera) with camera being the camera of the view).

Note: For portability, this method does not take a system dependent viewer class, e.g. SoXtViewer, as its parameter. The SoGuiViewer associated with a viewer can be retrieved using the viewer's getGuiViewer() method.

static SoDEPRECATED SbBool PoBaseView::viewingEventCB ( void *  viewer,
void *  anyEvent 
) [inline, static]

The callback is automatically registered in the So<XXX>Viewer classes.

Deprecated:

Deprecated since Open Inventor 8100
No longer used.

Member Data Documentation

Lower-left corner coordinates of the viewport of the view.


These coordinates must be given in the normalized space [0-1]*[0-1]. The coordinate (0,0) is the lower- left corner of the display window and (1,1) is the upper-right corner. Default is 0,0.

Size of the viewport of the view.


viewportSize[0] is the viewport's width and viewportSize[1] is the viewport's height, each in normalized space. Therefore viewportOrigin[0]+viewportSize[0] and viewportOrigin[1]+viewportSize[1] must be less than or equal to 1. Default is 1,1.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/