![]() |
NutsnBolts
0.1.0
An extension library for Coin
|
Public Member Functions | |
| NbNavigationControl (void) | |
| virtual | ~NbNavigationControl (void) |
| SoCamera * | getCamera (void) const |
| SoNode * | getSceneGraph (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 |
| NbNavigationControl::NbNavigationControl | ( | void | ) |
Constructor.
|
virtual |
Destructor.
| SoCamera * NbNavigationControl::getCamera | ( | void | ) | const |
Returns the pointer the the camera that is to be manipulated.
| SoNode * NbNavigationControl::getSceneGraph | ( | void | ) | const |
Returns the set scene graph.
| 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.
| float NbNavigationControl::getViewportAspect | ( | void | ) | const |
Returns the aspect ratio of the viewport - its width divided by height.
| SbVec2s NbNavigationControl::getViewportSize | ( | void | ) | const |
Returns the size of the viewport in pixels.
| void NbNavigationControl::moveCamera | ( | const SbVec3f & | distance | ) | const |
This method moves the camera.
| 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.
| 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.
| void NbNavigationControl::pitchCamera | ( | float | angle | ) | const |
This method reorients the camera in the pitch plane.
| void NbNavigationControl::pointDir | ( | const SbVec3f & | dir | ) | const |
Orients the camera so that it points in the given direction.
| void NbNavigationControl::reorientCamera | ( | const SbRotation & | rot | ) | const |
This method reorients the camera according to the given rotation.
| void NbNavigationControl::reorientCamera | ( | const SbVec3f & | pointat | ) | const |
This method reorients the camera to point at the pointat location.
| void NbNavigationControl::resetRoll | ( | void | ) | const |
This method resets the roll of the camera. If no up vector has been set, this method does nothing.
| 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.
| void NbNavigationControl::rollCamera | ( | float | angle | ) | const |
This method reorients the camera in the roll plane.
| 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().
| void NbNavigationControl::setCamera | ( | SoCamera * | camera | ) |
Sets the pointer to the camera that is to be manipulated.
| void NbNavigationControl::setSceneGraph | ( | SoNode * | scenegraph | ) |
Sets the scene graph. Needed for certain navigation modes that for instance perform picking.
| 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.
| void NbNavigationControl::setViewport | ( | const SbViewportRegion & | vp | ) |
This method sets the viewport information.
| void NbNavigationControl::viewAll | ( | void | ) | const |
Positions the camera so that the whole model gets in view.
| void NbNavigationControl::yawCamera | ( | float | angle | ) | const |
This method reorients the camera in the yaw plane.