VTK
vtkCompassRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCompassRepresentation.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
16 /*-------------------------------------------------------------------------
17  Copyright 2008 Sandia Corporation.
18  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
19  the U.S. Government retains certain rights in this software.
20 -------------------------------------------------------------------------*/
21 
28 #ifndef vtkCompassRepresentation_h
29 #define vtkCompassRepresentation_h
30 
31 #include "vtkGeovisCoreModule.h" // For export macro
33 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
34 #include "vtkCenteredSliderRepresentation.h" // to use in a SP
35 #include "vtkSmartPointer.h" // used for SmartPointers
36 
37 class vtkActor2D;
38 class vtkPoints;
39 class vtkCellArray;
40 class vtkPolyData;
42 class vtkCoordinate;
43 class vtkProperty2D;
44 class vtkPropCollection;
45 class vtkWindow;
46 class vtkViewport;
47 class vtkTransform;
49 class vtkTextProperty;
50 class vtkTextActor;
51 
52 
55 {
56 public:
59 
61 
64  void PrintSelf(ostream& os, vtkIndent indent);
66 
74 
82 
84 
88 
90 
92  vtkGetObjectMacro(SelectedProperty,vtkProperty2D);
94 
96 
99 
101 
104  virtual void PlaceWidget(double bounds[6]);
105  virtual void BuildRepresentation();
106  virtual void StartWidgetInteraction(double eventPos[2]);
107  virtual void WidgetInteraction(double eventPos[2]);
108  virtual void TiltWidgetInteraction(double eventPos[2]);
109  virtual void DistanceWidgetInteraction(double eventPos[2]);
110  virtual int ComputeInteractionState(int X, int Y, int modify=0);
111  virtual void Highlight(int);
113 
115 
116  virtual void GetActors(vtkPropCollection*);
118  virtual int RenderOverlay(vtkViewport*);
121 
122  virtual void SetHeading(double value);
123  virtual double GetHeading();
124  virtual void SetTilt(double value);
125  virtual double GetTilt();
126  virtual void UpdateTilt(double time);
127  virtual void EndTilt();
128  virtual void SetDistance(double value);
129  virtual double GetDistance();
130  virtual void UpdateDistance(double time);
131  virtual void EndDistance();
132  virtual void SetRenderer(vtkRenderer *ren);
133 
134 //BTX
135  // Enums are used to describe what is selected
137  {
138  Outside=0,
146  DistanceAdjusting
147  };
148 //ETX
149 
150 protected:
153 
154  // Positioning the widget
157 
158  // radius values
159  double InnerRadius;
160  double OuterRadius;
161 
162  // tilt and distance rep
163  //BTX
166  //ETX
167 
168  // Define the geometry. It is constructed in canaonical position
169  // along the x-axis and then rotated into position.
172 
178 
181 
186 
188 
189  // build the tube geometry
190  void BuildRing();
192 
193  // used for positioning etc
194  void GetCenterAndUnitRadius(int center[2], double &radius);
195 
197 
198  double Heading;
199  double Tilt;
200  double Distance;
201 
202 private:
203  vtkCompassRepresentation(const vtkCompassRepresentation&); //Not implemented
204  void operator=(const vtkCompassRepresentation&); //Not implemented
205 };
206 
207 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkCompassRepresentation::TiltAdjusting
@ TiltAdjusting
Definition: vtkCompassRepresentation.h:143
vtkCompassRepresentation::_InteractionState
_InteractionState
Definition: vtkCompassRepresentation.h:137
vtkCompassRepresentation::Distance
double Distance
Definition: vtkCompassRepresentation.h:200
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:51
vtkCompassRepresentation::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *)
vtkCompassRepresentation::StatusActor
vtkTextActor * StatusActor
Definition: vtkCompassRepresentation.h:185
vtkCompassRepresentation::UpdateTilt
virtual void UpdateTilt(double time)
vtkCompassRepresentation::New
static vtkCompassRepresentation * New()
vtkCompassRepresentation::PlaceWidget
virtual void PlaceWidget(double bounds[6])
vtkCompassRepresentation::~vtkCompassRepresentation
~vtkCompassRepresentation()
vtkCompassRepresentation::BuildRing
void BuildRing()
vtkCompassRepresentation::SetHeading
virtual void SetHeading(double value)
vtkCompassRepresentation::SetRenderer
virtual void SetRenderer(vtkRenderer *ren)
vtkCompassRepresentation::SetTilt
virtual void SetTilt(double value)
vtkGeovisCoreModule.h
vtkCompassRepresentation::SelectedProperty
vtkProperty2D * SelectedProperty
Definition: vtkCompassRepresentation.h:187
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkCompassRepresentation::EndTilt
virtual void EndTilt()
vtkCenteredSliderRepresentation.h
vtkSmartPointer< vtkCenteredSliderRepresentation >
vtkCompassRepresentation::GetPoint2Coordinate
vtkCoordinate * GetPoint2Coordinate()
vtkCompassRepresentation::DistanceWidgetInteraction
virtual void DistanceWidgetInteraction(double eventPos[2])
vtkX3D::center
@ center
Definition: vtkX3D.h:230
vtkCompassRepresentation::TiltRepresentation
vtkSmartPointer< vtkCenteredSliderRepresentation > TiltRepresentation
Definition: vtkCompassRepresentation.h:164
vtkX3D::time
@ time
Definition: vtkX3D.h:497
vtkCompassRepresentation::InnerRadius
double InnerRadius
Definition: vtkCompassRepresentation.h:159
vtkCompassRepresentation::WidgetInteraction
virtual void WidgetInteraction(double eventPos[2])
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:60
vtkCompassRepresentation::RingMapper
vtkPolyDataMapper2D * RingMapper
Definition: vtkCompassRepresentation.h:175
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkCompassRepresentation::RingActor
vtkActor2D * RingActor
Definition: vtkCompassRepresentation.h:176
vtkCompassRepresentation::RenderOverlay
virtual int RenderOverlay(vtkViewport *)
vtkCompassRepresentation::StartWidgetInteraction
virtual void StartWidgetInteraction(double eventPos[2])
vtkCompassRepresentation::Highlight
virtual void Highlight(int)
vtkCompassRepresentation::RingProperty
vtkProperty2D * RingProperty
Definition: vtkCompassRepresentation.h:177
vtkCompassRepresentation::HighlightState
int HighlightState
Definition: vtkCompassRepresentation.h:196
vtkCompassRepresentation::DistanceRepresentation
vtkSmartPointer< vtkCenteredSliderRepresentation > DistanceRepresentation
Definition: vtkCompassRepresentation.h:165
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkContinuousValueWidgetRepresentation
provide the representation for a continuous value
Definition: vtkContinuousValueWidgetRepresentation.h:37
vtkCompassRepresentation::DistanceIn
@ DistanceIn
Definition: vtkCompassRepresentation.h:145
vtkCompassRepresentation::Backdrop
vtkActor2D * Backdrop
Definition: vtkCompassRepresentation.h:180
vtkCompassRepresentation::Heading
double Heading
Definition: vtkCompassRepresentation.h:198
vtkCompassRepresentation::Point2Coordinate
vtkCoordinate * Point2Coordinate
Definition: vtkCompassRepresentation.h:156
vtkTextActor
An actor that displays text. Scaled or unscaled.
Definition: vtkTextActor.h:55
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCompassRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkCompassRepresentation::GetDistance
virtual double GetDistance()
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkCompassRepresentation::Point1Coordinate
vtkCoordinate * Point1Coordinate
Definition: vtkCompassRepresentation.h:155
vtkSmartPointer.h
vtkCompassRepresentation::Inside
@ Inside
Definition: vtkCompassRepresentation.h:139
vtkCompassRepresentation::EndDistance
virtual void EndDistance()
vtkCoordinate
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:70
vtkCompassRepresentation::BackdropMapper
vtkPolyDataMapper2D * BackdropMapper
Definition: vtkCompassRepresentation.h:179
vtkCompassRepresentation::UpdateDistance
virtual void UpdateDistance(double time)
vtkContinuousValueWidgetRepresentation.h
vtkTransformPolyDataFilter
transform points and associated normals and vectors for polygonal dataset
Definition: vtkTransformPolyDataFilter.h:51
vtkCompassRepresentation::Tilt
double Tilt
Definition: vtkCompassRepresentation.h:199
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkCompassRepresentation::BuildRepresentation
virtual void BuildRepresentation()
vtkCoordinate.h
vtkCompassRepresentation::DistanceOut
@ DistanceOut
Definition: vtkCompassRepresentation.h:144
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:39
vtkCompassRepresentation::TiltUp
@ TiltUp
Definition: vtkCompassRepresentation.h:142
vtkProperty2D
represent surface properties of a 2D image
Definition: vtkProperty2D.h:40
VTKGEOVISCORE_EXPORT
#define VTKGEOVISCORE_EXPORT
Definition: vtkGeovisCoreModule.h:15
vtkCompassRepresentation::Adjusting
@ Adjusting
Definition: vtkCompassRepresentation.h:140
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:45
vtkCompassRepresentation::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkCompassRepresentation::LabelActor
vtkTextActor * LabelActor
Definition: vtkCompassRepresentation.h:183
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkCompassRepresentation::Ring
vtkPolyData * Ring
Definition: vtkCompassRepresentation.h:173
vtkCompassRepresentation::TiltWidgetInteraction
virtual void TiltWidgetInteraction(double eventPos[2])
vtkCompassRepresentation::vtkCompassRepresentation
vtkCompassRepresentation()
vtkCompassRepresentation
provide a compass
Definition: vtkCompassRepresentation.h:55
vtkCompassRepresentation::GetHeading
virtual double GetHeading()
vtkCompassRepresentation::Points
vtkPoints * Points
Definition: vtkCompassRepresentation.h:171
vtkCompassRepresentation::GetActors
virtual void GetActors(vtkPropCollection *)
vtkCompassRepresentation::LabelProperty
vtkTextProperty * LabelProperty
Definition: vtkCompassRepresentation.h:182
vtkCompassRepresentation::RingXForm
vtkTransformPolyDataFilter * RingXForm
Definition: vtkCompassRepresentation.h:174
vtkCompassRepresentation::XForm
vtkTransform * XForm
Definition: vtkCompassRepresentation.h:170
vtkCompassRepresentation::TiltDown
@ TiltDown
Definition: vtkCompassRepresentation.h:141
vtkCompassRepresentation::GetPoint1Coordinate
vtkCoordinate * GetPoint1Coordinate()
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:38
vtkX3D::radius
@ radius
Definition: vtkX3D.h:252
vtkCompassRepresentation::OuterRadius
double OuterRadius
Definition: vtkCompassRepresentation.h:160
vtkCompassRepresentation::GetTilt
virtual double GetTilt()
vtkCompassRepresentation::StatusProperty
vtkTextProperty * StatusProperty
Definition: vtkCompassRepresentation.h:184
vtkCompassRepresentation::SetDistance
virtual void SetDistance(double value)
vtkCompassRepresentation::GetCenterAndUnitRadius
void GetCenterAndUnitRadius(int center[2], double &radius)
vtkCompassRepresentation::ComputeInteractionState
virtual int ComputeInteractionState(int X, int Y, int modify=0)
vtkCompassRepresentation::BuildBackdrop
void BuildBackdrop()