Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

vtkInteractorStyleUnicam Class Reference

provides Unicam navigation style. More...

#include <vtkInteractorStyleUnicam.h>

Inheritance diagram for vtkInteractorStyleUnicam:

Inheritance graph
[legend]
Collaboration diagram for vtkInteractorStyleUnicam:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void OnLeftButtonMove (int ctrl, int shift, int X, int Y)
virtual void OnMiddleButtonMove (int, int, int, int)
virtual void OnRightButtonMove (int, int, int, int)
virtual void OnTimer (void)
void SetWorldUpVector (double a[3])
void SetWorldUpVector (float a[3])
void SetWorldUpVector (float x, float y, float z)
virtual float * GetWorldUpVector ()
virtual void GetWorldUpVector (float data[3])
virtual void OnLeftButtonDown (int ctrl, int shift, int X, int Y)
virtual void OnLeftButtonUp (int ctrl, int shift, int X, int Y)
virtual void OnMouseMove (int ctrl, int shift, int X, int Y)

Static Public Methods

vtkInteractorStyleUnicam * New ()
int IsTypeOf (const char *type)
vtkInteractorStyleUnicam * SafeDownCast (vtkObject *o)

Protected Methods

 vtkInteractorStyleUnicam ()
virtual ~vtkInteractorStyleUnicam ()
void Choose (int X, int Y)
void Rotate (int X, int Y)
void Dolly (int X, int Y)
void Pan (int X, int Y)
void MyTranslateCamera (float v[3])
void MyRotateCamera (float cx, float cy, float cz, float ax, float ay, float az, float angle)
void GetRightVandUpV (float *p, vtkCamera *cam, float *rightV, float *upV)
void NormalizeMouseXY (int X, int Y, float *NX, float *NY)
float WindowAspect ()

Protected Attributes

vtkWorldPointPickerInteractionPicker
int ButtonDown
double DTime
double Dist
float StartPix [2]
float LastPos [2]
float LastPix [2]
float DownPt [3]
float Center [3]
float WorldUpVector [3]
vtkActorFocusSphere
int IsDot
vtkRendererFocusSphereRenderer
int state

Detailed Description

provides Unicam navigation style.

Date:
2001/11/13 14:17:20
Revision:
1.12

UniCam is a camera interactor. Here, just the primary features of the UniCam technique are implemented. UniCam requires just one mouse button and supports context sensitive dollying, panning, and rotation. (In this implementation, it uses the right mouse button, leaving the middle and left available for other functions.) For more information, see the paper at:

ftp://ftp.cs.brown.edu/pub/papers/graphics/research/unicam.pdf

The following is a brief description of the UniCam Camera Controls. You can perform 3 operations on the camera: rotate, pan, and dolly the camera. All operations are reached through the right mouse button & mouse movements.

IMPORTANT: UniCam assumes there is an axis that makes sense as a "up" vector for the world. By default, this axis is defined to be the vector <0,0,1>. You can set it explicitly for the data you are viewing with the 'SetWorldUpVector(..)' method in C++, or similarly in Tcl/Tk (or other interpreted languages).

1. ROTATE:

Position the cursor over the point you wish to rotate around and press and release the left mouse button. A 'focus dot' appears indicating the point that will be the center of rotation. To rotate, press and hold the left mouse button and drag the mouse.. release the button to complete the rotation.

Rotations can be done without placing a focus dot first by moving the mouse cursor to within 10% of the window border & pressing and holding the left button followed by dragging the mouse. The last focus dot position will be re-used.

2. PAN:

Click and hold the left mouse button, and initially move the mouse left or right. The point under the initial pick will pick correlate w/ the mouse tip-- (i.e., direct manipulation).

3. DOLLY (+ PAN):

Click and hold the left mouse button, and initially move the mouse up or down. Moving the mouse down will dolly towards the picked point, and moving the mouse up will dolly away from it. Dollying occurs relative to the picked point which simplifies the task of dollying towards a region of interest. Left and right mouse movements will pan the camera left and right.

Warning:
(NOTE: This implementation of Unicam assumes a perspective camera. It could be modified relatively easily to also support an orthographic projection.)

Definition at line 120 of file vtkInteractorStyleUnicam.h.


Constructor & Destructor Documentation

vtkInteractorStyleUnicam::vtkInteractorStyleUnicam   [protected]
 

virtual vtkInteractorStyleUnicam::~vtkInteractorStyleUnicam   [protected, virtual]
 


Member Function Documentation

vtkInteractorStyleUnicam* vtkInteractorStyleUnicam::New   [static]
 

This class must be supplied with a vtkRenderWindowInteractor wrapper or parent. This class should not normally be instantiated by application programmers.

Reimplemented from vtkInteractorStyle.

virtual const char* vtkInteractorStyleUnicam::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkInteractorStyle.

int vtkInteractorStyleUnicam::IsTypeOf const char *    type [static]
 

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkInteractorStyle.

virtual int vtkInteractorStyleUnicam::IsA const char *    type [virtual]
 

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkInteractorStyle.

vtkInteractorStyleUnicam* vtkInteractorStyleUnicam::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkInteractorStyle.

void vtkInteractorStyleUnicam::PrintSelf ostream &    os,
vtkIndent    indent
[virtual]
 

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleUnicam::OnLeftButtonDown int    ctrl,
int    shift,
int    X,
int    Y
[virtual]
 

Concrete implementation of event bindings

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleUnicam::OnLeftButtonUp int    ctrl,
int    shift,
int    X,
int    Y
[virtual]
 

Concrete implementation of event bindings

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleUnicam::OnMouseMove int    ctrl,
int    shift,
int    X,
int    Y
[virtual]
 

Concrete implementation of event bindings

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleUnicam::OnLeftButtonMove int    ctrl,
int    shift,
int    X,
int    Y
[virtual]
 

virtual void vtkInteractorStyleUnicam::OnMiddleButtonMove int   ,
int   ,
int   ,
int   
[inline, virtual]
 

Definition at line 135 of file vtkInteractorStyleUnicam.h.

virtual void vtkInteractorStyleUnicam::OnRightButtonMove int   ,
int   ,
int   ,
int   
[inline, virtual]
 

Definition at line 136 of file vtkInteractorStyleUnicam.h.

virtual void vtkInteractorStyleUnicam::OnTimer void    [virtual]
 

OnTimer calls RotateCamera, RotateActor etc which should be overridden by style subclasses.

Reimplemented from vtkInteractorStyle.

void vtkInteractorStyleUnicam::SetWorldUpVector double    a[3] [inline]
 

Definition at line 142 of file vtkInteractorStyleUnicam.h.

void vtkInteractorStyleUnicam::SetWorldUpVector float    a[3] [inline]
 

Definition at line 143 of file vtkInteractorStyleUnicam.h.

void vtkInteractorStyleUnicam::SetWorldUpVector float    x,
float    y,
float    z
 

virtual float* vtkInteractorStyleUnicam::GetWorldUpVector   [virtual]
 

virtual void vtkInteractorStyleUnicam::GetWorldUpVector float    data[3] [virtual]
 

void vtkInteractorStyleUnicam::Choose int    X,
int    Y
[protected]
 

void vtkInteractorStyleUnicam::Rotate int    X,
int    Y
[protected]
 

void vtkInteractorStyleUnicam::Dolly int    X,
int    Y
[protected]
 

void vtkInteractorStyleUnicam::Pan int    X,
int    Y
[protected]
 

void vtkInteractorStyleUnicam::MyTranslateCamera float    v[3] [protected]
 

void vtkInteractorStyleUnicam::MyRotateCamera float    cx,
float    cy,
float    cz,
float    ax,
float    ay,
float    az,
float    angle
[protected]
 

void vtkInteractorStyleUnicam::GetRightVandUpV float *    p,
vtkCamera   cam,
float *    rightV,
float *    upV
[protected]
 

void vtkInteractorStyleUnicam::NormalizeMouseXY int    X,
int    Y,
float *    NX,
float *    NY
[protected]
 

float vtkInteractorStyleUnicam::WindowAspect   [protected]
 


Member Data Documentation

vtkWorldPointPicker* vtkInteractorStyleUnicam::InteractionPicker [protected]
 

Definition at line 151 of file vtkInteractorStyleUnicam.h.

int vtkInteractorStyleUnicam::ButtonDown [protected]
 

Definition at line 153 of file vtkInteractorStyleUnicam.h.

double vtkInteractorStyleUnicam::DTime [protected]
 

Definition at line 154 of file vtkInteractorStyleUnicam.h.

double vtkInteractorStyleUnicam::Dist [protected]
 

Definition at line 155 of file vtkInteractorStyleUnicam.h.

float vtkInteractorStyleUnicam::StartPix[2] [protected]
 

Definition at line 156 of file vtkInteractorStyleUnicam.h.

float vtkInteractorStyleUnicam::LastPos[2] [protected]
 

Reimplemented from vtkInteractorStyle.

Definition at line 157 of file vtkInteractorStyleUnicam.h.

float vtkInteractorStyleUnicam::LastPix[2] [protected]
 

Definition at line 158 of file vtkInteractorStyleUnicam.h.

float vtkInteractorStyleUnicam::DownPt[3] [protected]
 

Definition at line 159 of file vtkInteractorStyleUnicam.h.

float vtkInteractorStyleUnicam::Center[3] [protected]
 

Reimplemented from vtkInteractorStyle.

Definition at line 160 of file vtkInteractorStyleUnicam.h.

float vtkInteractorStyleUnicam::WorldUpVector[3] [protected]
 

Definition at line 162 of file vtkInteractorStyleUnicam.h.

vtkActor* vtkInteractorStyleUnicam::FocusSphere [protected]
 

Definition at line 164 of file vtkInteractorStyleUnicam.h.

int vtkInteractorStyleUnicam::IsDot [protected]
 

Definition at line 165 of file vtkInteractorStyleUnicam.h.

vtkRenderer* vtkInteractorStyleUnicam::FocusSphereRenderer [protected]
 

Definition at line 166 of file vtkInteractorStyleUnicam.h.

int vtkInteractorStyleUnicam::state [protected]
 

Definition at line 168 of file vtkInteractorStyleUnicam.h.


The documentation for this class was generated from the following file:
Generated on Thu Mar 28 14:33:58 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001