VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkInteractorStyleTerrain Class Reference

manipulate camera in scene with natural view up (e.g., terrain) More...

#include <vtkInteractorStyleTerrain.h>

Inheritance diagram for vtkInteractorStyleTerrain:
[legend]
Collaboration diagram for vtkInteractorStyleTerrain:
[legend]

Public Types

typedef vtkInteractorStyle Superclass
 
- Public Types inherited from vtkInteractorStyle
typedef vtkInteractorObserver Superclass
 
- Public Types inherited from vtkInteractorObserver
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkInteractorStyleTerrainNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void OnChar ()
 
virtual void Rotate ()
 
virtual void Pan ()
 
virtual void Dolly ()
 
virtual void OnMouseMove ()
 
virtual void OnLeftButtonDown ()
 
virtual void OnLeftButtonUp ()
 
virtual void OnMiddleButtonDown ()
 
virtual void OnMiddleButtonUp ()
 
virtual void OnRightButtonDown ()
 
virtual void OnRightButtonUp ()
 
virtual void SetLatLongLines (int)
 
virtual int GetLatLongLines ()
 
virtual void LatLongLinesOn ()
 
virtual void LatLongLinesOff ()
 
- Public Member Functions inherited from vtkInteractorStyle
vtkInteractorStyleNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void SetInteractor (vtkRenderWindowInteractor *interactor)
 
virtual void SetEnabled (int)
 
void FindPokedRenderer (int, int)
 
virtual void OnKeyDown ()
 
virtual void OnKeyUp ()
 
virtual void OnKeyPress ()
 
virtual void OnKeyRelease ()
 
virtual void OnTimer ()
 
virtual void SetAutoAdjustCameraClippingRange (int)
 
virtual int GetAutoAdjustCameraClippingRange ()
 
virtual void AutoAdjustCameraClippingRangeOn ()
 
virtual void AutoAdjustCameraClippingRangeOff ()
 
virtual int GetState ()
 
virtual int GetUseTimers ()
 
virtual void SetUseTimers (int)
 
virtual void UseTimersOn ()
 
virtual void UseTimersOff ()
 
virtual void SetTimerDuration (unsigned long)
 
virtual unsigned long GetTimerDuration ()
 
virtual void SetHandleObservers (int)
 
virtual int GetHandleObservers ()
 
virtual void HandleObserversOn ()
 
virtual void HandleObserversOff ()
 
virtual void OnMouseWheelForward ()
 
virtual void OnMouseWheelBackward ()
 
virtual void OnExpose ()
 
virtual void OnConfigure ()
 
virtual void OnEnter ()
 
virtual void OnLeave ()
 
virtual void Spin ()
 
virtual void Zoom ()
 
virtual void UniformScale ()
 
virtual void StartState (int newstate)
 
virtual void StopState ()
 
virtual void StartAnimate ()
 
virtual void StopAnimate ()
 
virtual void StartRotate ()
 
virtual void EndRotate ()
 
virtual void StartZoom ()
 
virtual void EndZoom ()
 
virtual void StartPan ()
 
virtual void EndPan ()
 
virtual void StartSpin ()
 
virtual void EndSpin ()
 
virtual void StartDolly ()
 
virtual void EndDolly ()
 
virtual void StartUniformScale ()
 
virtual void EndUniformScale ()
 
virtual void StartTimer ()
 
virtual void EndTimer ()
 
virtual void StartTwoPointer ()
 
virtual void EndTwoPointer ()
 
virtual void HighlightProp (vtkProp *prop)
 
virtual void HighlightActor2D (vtkActor2D *actor2D)
 
virtual void HighlightProp3D (vtkProp3D *prop3D)
 
virtual void SetPickColor (double, double, double)
 
virtual void SetPickColor (double[3])
 
virtual doubleGetPickColor ()
 
virtual void GetPickColor (double data[3])
 
virtual void SetMouseWheelMotionFactor (double)
 
virtual double GetMouseWheelMotionFactor ()
 
virtual vtkTDxInteractorStyleGetTDxStyle ()
 
virtual void SetTDxStyle (vtkTDxInteractorStyle *tdxStyle)
 
void DelegateTDxEvent (unsigned long event, void *calldata)
 
- Public Member Functions inherited from vtkInteractorObserver
vtkInteractorObserverNewInstance () const
 
int GetEnabled ()
 
void EnabledOn ()
 
void EnabledOff ()
 
void On ()
 
void Off ()
 
virtual vtkRenderWindowInteractorGetInteractor ()
 
virtual void SetPriority (float)
 
virtual float GetPriority ()
 
virtual void PickingManagedOn ()
 
virtual void PickingManagedOff ()
 
virtual void SetPickingManaged (bool)
 
virtual bool GetPickingManaged ()
 
virtual void SetKeyPressActivation (int)
 
virtual int GetKeyPressActivation ()
 
virtual void KeyPressActivationOn ()
 
virtual void KeyPressActivationOff ()
 
virtual void SetKeyPressActivationValue (char)
 
virtual char GetKeyPressActivationValue ()
 
virtual vtkRendererGetDefaultRenderer ()
 
virtual void SetDefaultRenderer (vtkRenderer *)
 
virtual vtkRendererGetCurrentRenderer ()
 
virtual void SetCurrentRenderer (vtkRenderer *)
 
void GrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void ReleaseFocus ()
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkInteractorStyleTerrainNew ()
 
static int IsTypeOf (const char *type)
 
static vtkInteractorStyleTerrainSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkInteractorStyle
static vtkInteractorStyleNew ()
 
static int IsTypeOf (const char *type)
 
static vtkInteractorStyleSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkInteractorObserver
static int IsTypeOf (const char *type)
 
static vtkInteractorObserverSafeDownCast (vtkObjectBase *o)
 
static void ComputeDisplayToWorld (vtkRenderer *ren, double x, double y, double z, double worldPt[4])
 
static void ComputeWorldToDisplay (vtkRenderer *ren, double x, double y, double z, double displayPt[3])
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkInteractorStyleTerrain ()
 
 ~vtkInteractorStyleTerrain ()
 
void SelectRepresentation ()
 
void CreateLatLong ()
 
- Protected Member Functions inherited from vtkInteractorStyle
 vtkInteractorStyle ()
 
 ~vtkInteractorStyle ()
 
- Protected Member Functions inherited from vtkInteractorObserver
 vtkInteractorObserver ()
 
 ~vtkInteractorObserver ()
 
virtual void RegisterPickers ()
 
void UnRegisterPickers ()
 
virtual void PickersModified ()
 
vtkPickingManagerGetPickingManager ()
 
int RequestCursorShape (int requestedShape)
 
virtual void StartInteraction ()
 
virtual void EndInteraction ()
 
void ComputeDisplayToWorld (double x, double y, double z, double worldPt[4])
 
void ComputeWorldToDisplay (double x, double y, double z, double displayPt[3])
 
vtkAssemblyPathGetAssemblyPath (double X, double Y, double Z, vtkAbstractPropPicker *picker)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

int LatLongLines
 
vtkSphereSourceLatLongSphere
 
vtkPolyDataMapperLatLongMapper
 
vtkActorLatLongActor
 
vtkExtractEdgesLatLongExtractEdges
 
double MotionFactor
 
- Protected Attributes inherited from vtkInteractorStyle
int State
 
int AnimState
 
int HandleObservers
 
int UseTimers
 
int TimerId
 
int AutoAdjustCameraClippingRange
 
vtkOutlineSourceOutline
 
vtkPolyDataMapperOutlineMapper
 
vtkActorOutlineActor
 
vtkRendererPickedRenderer
 
vtkPropCurrentProp
 
vtkActor2DPickedActor2D
 
int PropPicked
 
double PickColor [3]
 
double MouseWheelMotionFactor
 
unsigned long TimerDuration
 
vtkEventForwarderCommandEventForwarder
 
vtkTDxInteractorStyleTDxStyle
 
- Protected Attributes inherited from vtkInteractorObserver
int Enabled
 
vtkCallbackCommandEventCallbackCommand
 
vtkCallbackCommandKeyPressCallbackCommand
 
float Priority
 
bool PickingManaged
 
int KeyPressActivation
 
char KeyPressActivationValue
 
vtkRenderWindowInteractorInteractor
 
vtkRendererCurrentRenderer
 
vtkRendererDefaultRenderer
 
unsigned long CharObserverTag
 
unsigned long DeleteObserverTag
 
vtkObserverMediatorObserverMediator
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkInteractorStyle
static void ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
 
- Static Protected Member Functions inherited from vtkInteractorObserver
static void ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
 

Detailed Description

manipulate camera in scene with natural view up (e.g., terrain)

vtkInteractorStyleTerrain is used to manipulate a camera which is viewing a scene with a natural view up, e.g., terrain. The camera in such a scene is manipulated by specifying azimuth (angle around the view up vector) and elevation (the angle from the horizon).

The mouse binding for this class is as follows. Left mouse click followed rotates the camera around the focal point using both elevation and azimuth invocations on the camera. Left mouse motion in the horizontal direction results in azimuth motion; left mouse motion in the vertical direction results in elevation motion. Therefore, diagonal motion results in a combination of azimuth and elevation. (If the shift key is held during motion, then only one of elevation or azimuth is invoked, depending on the whether the mouse motion is primarily horizontal or vertical.) Middle mouse button pans the camera across the scene (again the shift key has a similar effect on limiting the motion to the vertical or horizontal direction. The right mouse is used to dolly (e.g., a type of zoom) towards or away from the focal point.

The class also supports some keypress events. The "r" key resets the camera. The "e" key invokes the exit callback and by default exits the program. The "f" key sets a new camera focal point and flys towards that point. The "u" key invokes the user event. The "3" key toggles between stereo and non-stero mode. The "l" key toggles on/off a latitude/longitude markers that can be used to estimate/control position.

See also
vtkInteractorObserver vtkInteractorStyle vtk3DWidget
Events:
vtkCommand::InteractionEvent
Tests:
vtkInteractorStyleTerrain (Tests)

Definition at line 64 of file vtkInteractorStyleTerrain.h.

Member Typedef Documentation

Definition at line 70 of file vtkInteractorStyleTerrain.h.

Constructor & Destructor Documentation

vtkInteractorStyleTerrain::vtkInteractorStyleTerrain ( )
protected
vtkInteractorStyleTerrain::~vtkInteractorStyleTerrain ( )
protected

Member Function Documentation

static vtkInteractorStyleTerrain* vtkInteractorStyleTerrain::New ( )
static

Instantiate the object.

static int vtkInteractorStyleTerrain::IsTypeOf ( const char *  type)
static
virtual int vtkInteractorStyleTerrain::IsA ( const char *  name)
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.

static vtkInteractorStyleTerrain* vtkInteractorStyleTerrain::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkInteractorStyleTerrain::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkInteractorStyle.

vtkInteractorStyleTerrain* vtkInteractorStyleTerrain::NewInstance ( ) const
void vtkInteractorStyleTerrain::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 vtkObject.

virtual void vtkInteractorStyleTerrain::OnMouseMove ( )
virtual

Event bindings controlling the effects of pressing mouse buttons or moving the mouse.

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleTerrain::OnLeftButtonDown ( )
virtual

Event bindings controlling the effects of pressing mouse buttons or moving the mouse.

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleTerrain::OnLeftButtonUp ( )
virtual

Event bindings controlling the effects of pressing mouse buttons or moving the mouse.

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleTerrain::OnMiddleButtonDown ( )
virtual

Event bindings controlling the effects of pressing mouse buttons or moving the mouse.

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleTerrain::OnMiddleButtonUp ( )
virtual

Event bindings controlling the effects of pressing mouse buttons or moving the mouse.

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleTerrain::OnRightButtonDown ( )
virtual

Event bindings controlling the effects of pressing mouse buttons or moving the mouse.

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleTerrain::OnRightButtonUp ( )
virtual

Event bindings controlling the effects of pressing mouse buttons or moving the mouse.

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleTerrain::OnChar ( )
virtual

Override the "fly-to" (f keypress) for images.

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleTerrain::Rotate ( )
virtual

These methods for the different interactions in different modes are overridden in subclasses to perform the correct motion. Since they might be called from OnTimer, they do not have mouse coord parameters (use interactor's GetEventPosition and GetLastEventPosition)

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleTerrain::Pan ( )
virtual

These methods for the different interactions in different modes are overridden in subclasses to perform the correct motion. Since they might be called from OnTimer, they do not have mouse coord parameters (use interactor's GetEventPosition and GetLastEventPosition)

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleTerrain::Dolly ( )
virtual

These methods for the different interactions in different modes are overridden in subclasses to perform the correct motion. Since they might be called from OnTimer, they do not have mouse coord parameters (use interactor's GetEventPosition and GetLastEventPosition)

Reimplemented from vtkInteractorStyle.

virtual void vtkInteractorStyleTerrain::SetLatLongLines ( int  )
virtual

Turn on/off the latitude/longitude lines.

virtual int vtkInteractorStyleTerrain::GetLatLongLines ( )
virtual

Turn on/off the latitude/longitude lines.

virtual void vtkInteractorStyleTerrain::LatLongLinesOn ( )
virtual

Turn on/off the latitude/longitude lines.

virtual void vtkInteractorStyleTerrain::LatLongLinesOff ( )
virtual

Turn on/off the latitude/longitude lines.

void vtkInteractorStyleTerrain::SelectRepresentation ( )
protected
void vtkInteractorStyleTerrain::CreateLatLong ( )
protected

Member Data Documentation

int vtkInteractorStyleTerrain::LatLongLines
protected

Definition at line 106 of file vtkInteractorStyleTerrain.h.

vtkSphereSource* vtkInteractorStyleTerrain::LatLongSphere
protected

Definition at line 108 of file vtkInteractorStyleTerrain.h.

vtkPolyDataMapper* vtkInteractorStyleTerrain::LatLongMapper
protected

Definition at line 109 of file vtkInteractorStyleTerrain.h.

vtkActor* vtkInteractorStyleTerrain::LatLongActor
protected

Definition at line 110 of file vtkInteractorStyleTerrain.h.

vtkExtractEdges* vtkInteractorStyleTerrain::LatLongExtractEdges
protected

Definition at line 111 of file vtkInteractorStyleTerrain.h.

double vtkInteractorStyleTerrain::MotionFactor
protected

Definition at line 116 of file vtkInteractorStyleTerrain.h.


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