VTK
vtkDistanceRepresentation2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDistanceRepresentation2D.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 =========================================================================*/
31 #ifndef vtkDistanceRepresentation2D_h
32 #define vtkDistanceRepresentation2D_h
33 
35 #include "vtkInteractionWidgetsModule.h" // For export macro
36 
37 class vtkAxisActor2D;
38 class vtkProperty2D;
39 
40 class VTKINTERACTIONWIDGETS_EXPORT vtkDistanceRepresentation2D : public vtkDistanceRepresentation
41 {
42 public:
47 
49 
53  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
59  double GetDistance() override { return this->Distance; }
60 
62 
67  double* GetPoint1WorldPosition() override;
68  double* GetPoint2WorldPosition() override;
69  void GetPoint1WorldPosition(double pos[3]) override;
70  void GetPoint2WorldPosition(double pos[3]) override;
71  void SetPoint1WorldPosition(double pos[3]) override;
72  void SetPoint2WorldPosition(double pos[3]) override;
74 
75  void SetPoint1DisplayPosition(double pos[3]) override;
76  void SetPoint2DisplayPosition(double pos[3]) override;
77  void GetPoint1DisplayPosition(double pos[3]) override;
78  void GetPoint2DisplayPosition(double pos[3]) override;
79 
81 
86  vtkAxisActor2D* GetAxis();
87  vtkProperty2D* GetAxisProperty();
89 
93  void BuildRepresentation() override;
94 
96 
99  void ReleaseGraphicsResources(vtkWindow* w) override;
100  int RenderOverlay(vtkViewport* viewport) override;
101  int RenderOpaqueGeometry(vtkViewport* viewport) override;
103 
104 protected:
106  ~vtkDistanceRepresentation2D() override;
107 
108  // Add a line to the mix
111 
112  // The distance between the two points
113  double Distance;
114 
115 private:
117  void operator=(const vtkDistanceRepresentation2D&) = delete;
118 };
119 
120 #endif
vtkDistanceRepresentation2D
represent the vtkDistanceWidget
Definition: vtkDistanceRepresentation2D.h:40
vtkDistanceRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkDistanceRepresentation::GetPoint1DisplayPosition
virtual void GetPoint1DisplayPosition(double pos[3])=0
vtkDistanceRepresentation.h
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkWidgetRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkWidgetRepresentation.h:213
vtkDistanceRepresentation
represent the vtkDistanceWidget
Definition: vtkDistanceRepresentation.h:35
vtkDistanceRepresentation2D::Distance
double Distance
Definition: vtkDistanceRepresentation2D.h:113
vtkDistanceRepresentation::BuildRepresentation
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkDistanceRepresentation::SetPoint1WorldPosition
virtual void SetPoint1WorldPosition(double pos[3])=0
vtkDistanceRepresentation2D::AxisActor
vtkAxisActor2D * AxisActor
Definition: vtkDistanceRepresentation2D.h:109
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkProperty2D
represent surface properties of a 2D image
Definition: vtkProperty2D.h:37
vtkDistanceRepresentation2D::GetDistance
double GetDistance() override
Satisfy the superclasses API.
Definition: vtkDistanceRepresentation2D.h:59
vtkWidgetRepresentation::RenderOverlay
int RenderOverlay(vtkViewport *vtkNotUsed(viewport)) override
Definition: vtkWidgetRepresentation.h:214
vtkWidgetRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport)) override
Definition: vtkWidgetRepresentation.h:215
vtkDistanceRepresentation::GetPoint2WorldPosition
virtual double * GetPoint2WorldPosition()=0
vtkDistanceRepresentation::GetPoint1WorldPosition
virtual double * GetPoint1WorldPosition()=0
vtkDistanceRepresentation::SetPoint2WorldPosition
virtual void SetPoint2WorldPosition(double pos[3])=0
vtkAxisActor2D
Create an axis with tick marks and labels.
Definition: vtkAxisActor2D.h:69
vtkDistanceRepresentation2D::AxisProperty
vtkProperty2D * AxisProperty
Definition: vtkDistanceRepresentation2D.h:110
vtkDistanceRepresentation::GetPoint2DisplayPosition
virtual void GetPoint2DisplayPosition(double pos[3])=0
vtkDistanceRepresentation::SetPoint2DisplayPosition
virtual void SetPoint2DisplayPosition(double pos[3])=0
vtkDistanceRepresentation::SetPoint1DisplayPosition
virtual void SetPoint1DisplayPosition(double pos[3])=0