#include <vuArcBall.h>
Collaboration diagram for vuArcBall:

Public Member Functions | |
| vuArcBall () | |
| default constructor | |
| void | attachCamera (vuCamera &camera) |
| attach a camera | |
| void | setWinSize (int maxX, int maxY) |
| set extensions of window | |
| void | setCenter (vuVector ¢er) |
| set a center around which the camera rotates | |
| void | turn (int ox, int oy, int nx, int ny) |
| Turn camera. | |
Protected Member Functions | |
| vuVector | spherePoint (int px, int py) |
| Translate point into unit-sphere coordinate. | |
Protected Attributes | |
| int | m_Winx |
| This is the width of the window. | |
| int | m_Winy |
| This is the height of the window. | |
| vuVector | m_Center |
| This is the vector that points to the center of this window. | |
| vuCamera * | m_Camera |
| This is the camera associated with this window. | |
An arc ball is a useful way to control the rotation of an object. Therefore the surface points of a Halfsphere are mapped to the screen. If the mouse is dragged over the screen the rotation behaves like a ball which surface is touched by a moving finger.
Definition at line 13 of file vuArcBall.h.
|
|
default constructor
Definition at line 8 of file vuArcBall.cpp. References m_Camera. |
|
|
attach a camera
Definition at line 14 of file vuArcBall.cpp. References m_Camera. Referenced by vuSpecFVR::glOnMouse(), vuPreviewWin::glOnMouse(), vuBCCSheetSplatter::glOnMouse(), and vuBasicUtility::onMouseLeftMoving(). |
|
|
set a center around which the camera rotates
Definition at line 30 of file vuArcBall.cpp. References m_Center. |
|
||||||||||||
|
set extensions of window This is necessairy to provide a proper mapping of cartesian coordinates to surface points of a spere Definition at line 23 of file vuArcBall.cpp. References m_Winx, and m_Winy. Referenced by vuSpecFVR::glOnMouse(), vuPreviewWin::glOnMouse(), vuBCCSheetSplatter::glOnMouse(), and vuBasicUtility::onMouseLeftMoving(). |
|
||||||||||||
|
Translate point into unit-sphere coordinate.
Definition at line 38 of file vuArcBall.cpp. References m_Winx, and m_Winy. Referenced by turn(). |
|
||||||||||||||||||||
|
Turn camera. old (ox,oy) and new (nx,ny) position of mouse pointer are used to perform a rotation of the camera around a central point Definition at line 67 of file vuArcBall.cpp. References vuVector::cross, vuVector::dot, vuCamera::getViewMat(), M_1_PI, m_Camera, vuMatrix::makeRotate(), vuVector::makeUnit(), vuVector::norm2(), spherePoint(), and vuCamera::transform(). Referenced by vuSpecFVR::glOnMouse(), vuPreviewWin::glOnMouse(), vuBCCSheetSplatter::glOnMouse(), and vuBasicUtility::onMouseLeftMoving(). |
Here is the call graph for this function:

|
|
This is the camera associated with this window.
Definition at line 44 of file vuArcBall.h. Referenced by attachCamera(), turn(), and vuArcBall(). |
|
|
This is the vector that points to the center of this window.
Definition at line 43 of file vuArcBall.h. Referenced by setCenter(). |
|
|
This is the width of the window.
Definition at line 41 of file vuArcBall.h. Referenced by setWinSize(), and spherePoint(). |
|
|
This is the height of the window.
Definition at line 42 of file vuArcBall.h. Referenced by setWinSize(), and spherePoint(). |
1.3.9.1