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
29#ifndef vtkCompassRepresentation_h
30#define vtkCompassRepresentation_h
31
32#include "vtkGeovisCoreModule.h" // For export macro
34#include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
35#include "vtkCenteredSliderRepresentation.h" // to use in a SP
36#include "vtkSmartPointer.h" // used for SmartPointers
37
38class vtkActor2D;
39class vtkPoints;
40class vtkCellArray;
41class vtkPolyData;
43class vtkCoordinate;
44class vtkProperty2D;
46class vtkWindow;
47class vtkViewport;
48class vtkTransform;
50class vtkTextProperty;
51class vtkTextActor;
52
53
54class VTKGEOVISCORE_EXPORT vtkCompassRepresentation :
56{
57public:
62
64
67 vtkTypeMacro(vtkCompassRepresentation,
69 void PrintSelf(ostream& os, vtkIndent indent);
71
81
91
93
97 vtkGetObjectMacro(RingProperty,vtkProperty2D);
99
101
105 vtkGetObjectMacro(SelectedProperty,vtkProperty2D);
107
109
112 vtkGetObjectMacro(LabelProperty,vtkTextProperty);
114
116
121 virtual void PlaceWidget(double bounds[6]);
122 virtual void BuildRepresentation();
123 virtual void StartWidgetInteraction(double eventPos[2]);
124 virtual void WidgetInteraction(double eventPos[2]);
125 virtual void TiltWidgetInteraction(double eventPos[2]);
126 virtual void DistanceWidgetInteraction(double eventPos[2]);
127 virtual int ComputeInteractionState(int X, int Y, int modify=0);
128 virtual void Highlight(int);
130
132
140
141 virtual void SetHeading(double value);
142 virtual double GetHeading();
143 virtual void SetTilt(double value);
144 virtual double GetTilt();
145 virtual void UpdateTilt(double time);
146 virtual void EndTilt();
147 virtual void SetDistance(double value);
148 virtual double GetDistance();
149 virtual void UpdateDistance(double time);
150 virtual void EndDistance();
151 virtual void SetRenderer(vtkRenderer *ren);
152
153 // Enums are used to describe what is selected
155 {
156 Outside=0,
164 DistanceAdjusting
165 };
166
167protected:
170
171 // Positioning the widget
174
175 // radius values
178
179 // tilt and distance rep
180
183
184 // Define the geometry. It is constructed in canaonical position
185 // along the x-axis and then rotated into position.
188
194
197
202
204
205 // build the tube geometry
206 void BuildRing();
208
209 // used for positioning etc
210 void GetCenterAndUnitRadius(int center[2], double &radius);
211
213
214 double Heading;
215 double Tilt;
216 double Distance;
217
218private:
219 vtkCompassRepresentation(const vtkCompassRepresentation&) VTK_DELETE_FUNCTION;
220 void operator=(const vtkCompassRepresentation&) VTK_DELETE_FUNCTION;
221};
222
223#endif
a actor that draws 2D data
Definition: vtkActor2D.h:46
object to represent cell connectivity
Definition: vtkCellArray.h:51
virtual void TiltWidgetInteraction(double eventPos[2])
virtual void SetTilt(double value)
virtual double GetDistance()
vtkSmartPointer< vtkCenteredSliderRepresentation > TiltRepresentation
virtual void SetHeading(double value)
virtual void UpdateTilt(double time)
virtual double GetHeading()
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
virtual int RenderOverlay(vtkViewport *)
vtkPolyDataMapper2D * RingMapper
virtual void PlaceWidget(double bounds[6])
Methods to interface with the vtkSliderWidget.
virtual void EndDistance()
virtual void SetDistance(double value)
void GetCenterAndUnitRadius(int center[2], double &radius)
virtual void SetRenderer(vtkRenderer *ren)
Subclasses of vtkWidgetRepresentation must implement these methods.
virtual void StartWidgetInteraction(double eventPos[2])
virtual int ComputeInteractionState(int X, int Y, int modify=0)
vtkCoordinate * GetPoint1Coordinate()
Position the first end point of the slider.
static vtkCompassRepresentation * New()
Instantiate the class.
virtual void EndTilt()
vtkTransformPolyDataFilter * RingXForm
virtual void DistanceWidgetInteraction(double eventPos[2])
virtual double GetTilt()
virtual void BuildRepresentation()
virtual void GetActors(vtkPropCollection *)
Methods supporting the rendering process.
virtual void Highlight(int)
virtual void WidgetInteraction(double eventPos[2])
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkSmartPointer< vtkCenteredSliderRepresentation > DistanceRepresentation
virtual void UpdateDistance(double time)
vtkCoordinate * GetPoint2Coordinate()
Position the second end point of the slider.
vtkPolyDataMapper2D * BackdropMapper
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
provide the representation for a continuous value
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:71
a simple class to control print indentation
Definition: vtkIndent.h:40
represent and manipulate 3D points
Definition: vtkPoints.h:40
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
a list of Props
represent surface properties of a 2D image
Definition: vtkProperty2D.h:41
abstract specification for renderers
Definition: vtkRenderer.h:64
An actor that displays text.
Definition: vtkTextActor.h:57
represent text properties.
transform points and associated normals and vectors for polygonal dataset
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:61
abstract specification for Viewports
Definition: vtkViewport.h:48
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
@ value
Definition: vtkX3D.h:220
@ time
Definition: vtkX3D.h:497
@ center
Definition: vtkX3D.h:230
@ radius
Definition: vtkX3D.h:252