SceneInteractor Class Reference
[Nodes]

Base class for building a basic OpenInventor application without using the classic viewer classes. More...

#include <Inventor/ViewerComponents/nodes/SceneInteractor.h>

Inheritance diagram for SceneInteractor:
SoSeparator SoGroup SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject SceneExaminer SceneOrbiter

List of all members.

Public Types

enum  CameraMode {
  PERSPECTIVE,
  ORTHOGRAPHIC
}

Public Member Functions

 SceneInteractor ()
virtual ~SceneInteractor ()
void adjustClippingPlanes (const SbViewportRegion &vpRegion)
void viewAll (const SbViewportRegion &viewport)
void viewAxis (const SbVec3f &direction, const SbVec3f &up)
SoCameraInteractorgetCameraInteractor ()
SoCameragetCamera () const
virtual void setCameraMode (SceneInteractor::CameraMode mode)
SceneInteractor::CameraMode getCameraMode ()
void enableHeadLight (bool enabled)
bool isHeadLightEnabled ()

Detailed Description

Base class for building a basic OpenInventor application without using the classic viewer classes.

The SceneInteractor is a simple extension of the SoSeparator node that allows handling of Open Inventor events. This class should be overridden as it provides only empty event handlers. See, for example, SceneExaminer and SceneOrbiter.

This node is intended to be used as the root of a scene graph. The SceneInteractor is a custom SoSeparator whose children are:

The SceneInteractor uses an instance of SoCameraInteractor in order to manipulate the camera in response to OpenInventor events.

Class diagram of the SceneInteractor showing the relationship between the SoEventCallback, the SoCamera, the SoDirectionalLight (used as headlight) and the SoCameraInteractor.

SceneInteractor.png

Detail of the scene graph rooted by a SceneInteractor:

SceneInteractorSceneGraph.png

Notes:

SEE ALSO

SceneExaminer, SoCameraInteractor


Member Enumeration Documentation

Type of camera (perspective or orthographic).

Enumerator:
PERSPECTIVE 
ORTHOGRAPHIC 

Constructor & Destructor Documentation

SceneInteractor::SceneInteractor (  ) 

Constructor.

virtual SceneInteractor::~SceneInteractor (  )  [virtual]

Destructor.


Member Function Documentation

void SceneInteractor::adjustClippingPlanes ( const SbViewportRegion vpRegion  ) 

Adjust near and far clipping planes to minimize clipping of objects in the scene.

This adjustment, based on the bounding box of the scene, ensures that shapes will not be clipped and also that depth buffer precision is maximized. This method should be called before each render traversal.

void SceneInteractor::enableHeadLight ( bool  enabled  ) 

Enable or disable headlight.

Default is true.

SoCamera* SceneInteractor::getCamera (  )  const

Returns the current camera.

SoCameraInteractor* SceneInteractor::getCameraInteractor (  ) 

Returns the current camera interactor.

SceneInteractor::CameraMode SceneInteractor::getCameraMode (  ) 

Returns the current camera mode.

bool SceneInteractor::isHeadLightEnabled (  ) 

Returns if headlight is enabled.

virtual void SceneInteractor::setCameraMode ( SceneInteractor::CameraMode  mode  )  [virtual]

Select perspective or orthographic camera.

Default is perspective.

Reimplemented in SceneExaminer, and SceneOrbiter.

void SceneInteractor::viewAll ( const SbViewportRegion viewport  ) 

Move the camera to view the scene defined by the given path.

Equivalent to calling the SoCamera method viewAll(). Camera position is changed, but not orientation.

void SceneInteractor::viewAxis ( const SbVec3f direction,
const SbVec3f up 
)

Moves the camera to be aligned with the given direction vector while keeping the "up" direction of the camera parallel to the specified up vector.


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

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