VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkInteractorStyleUnicam Class Reference

provides Unicam navigation style More...

#include <vtkInteractorStyleUnicam.h>

Inherits vtkInteractorStyle.

Public Types

typedef vtkInteractorStyle Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkInteractorStyleUnicamNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void SetWorldUpVector (double a[3])
 
void SetWorldUpVector (double x, double y, double z)
 
virtual double * GetWorldUpVector ()
 
virtual void GetWorldUpVector (double data[3])
 
virtual void OnTimer ()
 
virtual void OnMouseMove ()
 
virtual void OnLeftButtonDown ()
 
virtual void OnLeftButtonUp ()
 
virtual void OnLeftButtonMove ()
 

Static Public Member Functions

static vtkInteractorStyleUnicamNew ()
 
static int IsTypeOf (const char *type)
 
static vtkInteractorStyleUnicamSafeDownCast (vtkObjectBase *o)
 

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 
 vtkInteractorStyleUnicam ()
 
virtual ~vtkInteractorStyleUnicam ()
 
void ChooseXY (int X, int Y)
 
void RotateXY (int X, int Y)
 
void DollyXY (int X, int Y)
 
void PanXY (int X, int Y)
 
void MyTranslateCamera (double v[3])
 
void MyRotateCamera (double cx, double cy, double cz, double ax, double ay, double az, double angle)
 
void GetRightVandUpV (double *p, vtkCamera *cam, double *rightV, double *upV)
 
void NormalizeMouseXY (int X, int Y, double *NX, double *NY)
 
double WindowAspect ()
 

Protected Attributes

vtkWorldPointPicker * InteractionPicker
 
int ButtonDown
 
double DTime
 
double Dist
 
double StartPix [2]
 
double LastPos [2]
 
double LastPix [2]
 
double DownPt [3]
 
double Center [3]
 
double WorldUpVector [3]
 
vtkActor * FocusSphere
 
int IsDot
 
vtkRenderer * FocusSphereRenderer
 
int state
 

Detailed Description

provides Unicam navigation style

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.

  1. 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).

  1. 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 108 of file vtkInteractorStyleUnicam.h.

Member Typedef Documentation

typedef vtkInteractorStyle vtkInteractorStyleUnicam::Superclass

Definition at line 112 of file vtkInteractorStyleUnicam.h.

Constructor & Destructor Documentation

vtkInteractorStyleUnicam::vtkInteractorStyleUnicam ( )
protected
virtual vtkInteractorStyleUnicam::~vtkInteractorStyleUnicam ( )
protectedvirtual

Member Function Documentation

static vtkInteractorStyleUnicam* vtkInteractorStyleUnicam::New ( )
static
static int vtkInteractorStyleUnicam::IsTypeOf ( const char *  type)
static
virtual int vtkInteractorStyleUnicam::IsA ( const char *  type)
virtual
static vtkInteractorStyleUnicam* vtkInteractorStyleUnicam::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkInteractorStyleUnicam::NewInstanceInternal ( ) const
protectedvirtual
vtkInteractorStyleUnicam* vtkInteractorStyleUnicam::NewInstance ( ) const
void vtkInteractorStyleUnicam::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
void vtkInteractorStyleUnicam::SetWorldUpVector ( double  a[3])
inline

Definition at line 115 of file vtkInteractorStyleUnicam.h.

void vtkInteractorStyleUnicam::SetWorldUpVector ( double  x,
double  y,
double  z 
)
virtual double* vtkInteractorStyleUnicam::GetWorldUpVector ( )
virtual
virtual void vtkInteractorStyleUnicam::GetWorldUpVector ( double  data[3])
virtual
virtual void vtkInteractorStyleUnicam::OnMouseMove ( )
virtual

Concrete implementation of event bindings

virtual void vtkInteractorStyleUnicam::OnLeftButtonDown ( )
virtual

Concrete implementation of event bindings

virtual void vtkInteractorStyleUnicam::OnLeftButtonUp ( )
virtual

Concrete implementation of event bindings

virtual void vtkInteractorStyleUnicam::OnLeftButtonMove ( )
virtual

Concrete implementation of event bindings

virtual void vtkInteractorStyleUnicam::OnTimer ( )
virtual

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

void vtkInteractorStyleUnicam::ChooseXY ( int  X,
int  Y 
)
protected
void vtkInteractorStyleUnicam::RotateXY ( int  X,
int  Y 
)
protected
void vtkInteractorStyleUnicam::DollyXY ( int  X,
int  Y 
)
protected
void vtkInteractorStyleUnicam::PanXY ( int  X,
int  Y 
)
protected
void vtkInteractorStyleUnicam::MyTranslateCamera ( double  v[3])
protected
void vtkInteractorStyleUnicam::MyRotateCamera ( double  cx,
double  cy,
double  cz,
double  ax,
double  ay,
double  az,
double  angle 
)
protected
void vtkInteractorStyleUnicam::GetRightVandUpV ( double *  p,
vtkCamera *  cam,
double *  rightV,
double *  upV 
)
protected
void vtkInteractorStyleUnicam::NormalizeMouseXY ( int  X,
int  Y,
double *  NX,
double *  NY 
)
protected
double vtkInteractorStyleUnicam::WindowAspect ( )
protected

Member Data Documentation

vtkWorldPointPicker* vtkInteractorStyleUnicam::InteractionPicker
protected

Definition at line 135 of file vtkInteractorStyleUnicam.h.

int vtkInteractorStyleUnicam::ButtonDown
protected

Definition at line 137 of file vtkInteractorStyleUnicam.h.

double vtkInteractorStyleUnicam::DTime
protected

Definition at line 138 of file vtkInteractorStyleUnicam.h.

double vtkInteractorStyleUnicam::Dist
protected

Definition at line 139 of file vtkInteractorStyleUnicam.h.

double vtkInteractorStyleUnicam::StartPix[2]
protected

Definition at line 140 of file vtkInteractorStyleUnicam.h.

double vtkInteractorStyleUnicam::LastPos[2]
protected

Definition at line 141 of file vtkInteractorStyleUnicam.h.

double vtkInteractorStyleUnicam::LastPix[2]
protected

Definition at line 142 of file vtkInteractorStyleUnicam.h.

double vtkInteractorStyleUnicam::DownPt[3]
protected

Definition at line 143 of file vtkInteractorStyleUnicam.h.

double vtkInteractorStyleUnicam::Center[3]
protected

Definition at line 144 of file vtkInteractorStyleUnicam.h.

double vtkInteractorStyleUnicam::WorldUpVector[3]
protected

Definition at line 146 of file vtkInteractorStyleUnicam.h.

vtkActor* vtkInteractorStyleUnicam::FocusSphere
protected

Definition at line 148 of file vtkInteractorStyleUnicam.h.

int vtkInteractorStyleUnicam::IsDot
protected

Definition at line 149 of file vtkInteractorStyleUnicam.h.

vtkRenderer* vtkInteractorStyleUnicam::FocusSphereRenderer
protected

Definition at line 150 of file vtkInteractorStyleUnicam.h.

int vtkInteractorStyleUnicam::state
protected

Definition at line 152 of file vtkInteractorStyleUnicam.h.


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