NutsnBolts  0.1.0
An extension library for Coin
Loading...
Searching...
No Matches
NbNavigationControl Class Reference

Public Member Functions

 NbNavigationControl (void)
 
virtual ~NbNavigationControl (void)
 
SoCamera * getCamera (void) const
 
SoNodegetSceneGraph (void) const
 
const SbVec3f & getUpVector (void) const
 
float getViewportAspect (void) const
 
SbVec2s getViewportSize (void) const
 
void moveCamera (const SbVec3f &distance) const
 
void moveCamera (float factor, const SbBool keepfocalpoint=TRUE) const
 
SoPath * pick (SbVec2s pos, SbVec3d &pickpos) const
 
void pitchCamera (float angle) const
 
void pointDir (const SbVec3f &dir) const
 
void reorientCamera (const SbRotation &rot) const
 
void reorientCamera (const SbVec3f &pointat) const
 
void resetRoll (void) const
 
void restoreCamera (void) const
 
void rollCamera (float angle) const
 
void saveCamera (void) const
 
void setCamera (SoCamera *camera)
 
void setSceneGraph (SoNode *scene)
 
void setUpVector (const SbVec3f &up)
 
void setViewport (const SbViewportRegion &vp)
 
void viewAll (void) const
 
void viewPart (SoPath *path, const SbVec3f &in, const SbVec3f &up) const
 
void yawCamera (float angle) const
 

Constructor & Destructor Documentation

◆ NbNavigationControl()

NbNavigationControl::NbNavigationControl ( void )

Constructor.

◆ ~NbNavigationControl()

NbNavigationControl::~NbNavigationControl ( void )
virtual

Destructor.

Member Function Documentation

◆ getCamera()

SoCamera * NbNavigationControl::getCamera ( void ) const

Returns the pointer the the camera that is to be manipulated.

See also
setCamera

◆ getSceneGraph()

SoNode * NbNavigationControl::getSceneGraph ( void ) const

Returns the set scene graph.

See also
setSceneGraph

◆ getUpVector()

const SbVec3f & NbNavigationControl::getUpVector ( void ) const

This method returns the up vector. Default value is (0, 0, 0) which is interpreted as no up direction.

See also
setUpVector, resetRoll

◆ getViewportAspect()

float NbNavigationControl::getViewportAspect ( void ) const

Returns the aspect ratio of the viewport - its width divided by height.

◆ getViewportSize()

SbVec2s NbNavigationControl::getViewportSize ( void ) const

Returns the size of the viewport in pixels.

◆ moveCamera() [1/2]

void NbNavigationControl::moveCamera ( const SbVec3f & distance) const

This method moves the camera.

See also
reorientCamera, saveCamera, restoreCamera

◆ moveCamera() [2/2]

void NbNavigationControl::moveCamera ( float factor,
const SbBool keepfocalpoint = TRUE ) const

This camera moves the camera straight forwards towards the focal point. The position of the focal point can be kept, or moved equally forwards as well.

◆ pick()

SoPath * NbNavigationControl::pick ( SbVec2s pos,
SbVec3d & pickpos ) const

Performs a pick in the scene.

pos is the 2D location on the viewport. pickpos is the returned 3D pick position.

The method returns the SoPath to the picked object if a point was picked, and NULL otherwise.

◆ pitchCamera()

void NbNavigationControl::pitchCamera ( float angle) const

This method reorients the camera in the pitch plane.

See also
rollCamera, yawCamera

◆ pointDir()

void NbNavigationControl::pointDir ( const SbVec3f & dir) const

Orients the camera so that it points in the given direction.

See also
reorientCamera

◆ reorientCamera() [1/2]

void NbNavigationControl::reorientCamera ( const SbRotation & rot) const

This method reorients the camera according to the given rotation.

See also
saveCamera, restoreCamera, moveCamera

◆ reorientCamera() [2/2]

void NbNavigationControl::reorientCamera ( const SbVec3f & pointat) const

This method reorients the camera to point at the pointat location.

◆ resetRoll()

void NbNavigationControl::resetRoll ( void ) const

This method resets the roll of the camera. If no up vector has been set, this method does nothing.

See also
rollCamera, setUpVector, getUpVector

◆ restoreCamera()

void NbNavigationControl::restoreCamera ( void ) const

This method restores the camera back to its last set position, or its initial position if saveCamera() has not been used yet.

See also
saveCamera

◆ rollCamera()

void NbNavigationControl::rollCamera ( float angle) const

This method reorients the camera in the roll plane.

See also
pitchCamera, yawCamera

◆ saveCamera()

void NbNavigationControl::saveCamera ( void ) const

This method saves the current camera position and orientation. You can later restore the camera back to this position by calling restoreCamera().

See also
restoreCamera

◆ setCamera()

void NbNavigationControl::setCamera ( SoCamera * camera)

Sets the pointer to the camera that is to be manipulated.

See also
getCamera

◆ setSceneGraph()

void NbNavigationControl::setSceneGraph ( SoNode * scenegraph)

Sets the scene graph. Needed for certain navigation modes that for instance perform picking.

See also
getSceneGraph

◆ setUpVector()

void NbNavigationControl::setUpVector ( const SbVec3f & up)

This method lets you set the up vector. Default value is (0, 0, 0) which means no up vector is set.

See also
getUpVector, resetRoll

◆ setViewport()

void NbNavigationControl::setViewport ( const SbViewportRegion & vp)

This method sets the viewport information.

◆ viewAll()

void NbNavigationControl::viewAll ( void ) const

Positions the camera so that the whole model gets in view.

◆ yawCamera()

void NbNavigationControl::yawCamera ( float angle) const

This method reorients the camera in the yaw plane.

See also
pitchCamera, rollCamera

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