8 #ifndef CV_CONSTRAINED_POLYLINE_REPRESENTATION_H
9 #define CV_CONSTRAINED_POLYLINE_REPRESENTATION_H
11 #include <vtkPolyLineRepresentation.h>
16 class vtkPolyDataMapper2D;
17 class vtkHandleRepresentation;
39 vtkPolyLineRepresentation);
82 this->SetHandlePosition(0, pos);
85 this->GetHandlePosition(0, pos);
91 this->SetHandlePosition(1, pos);
94 this->GetHandlePosition(1, pos);
100 this->SetHandlePosition(2, pos);
103 this->GetHandlePosition(2, pos);
Extended PolyLineRepresentation adding angle display functionality.
void GetPoint1DisplayPosition(double pos[3])
void SetVisibility(vtkTypeBool visible) override
Override SetVisibility to also control arc and label actors.
vtkPolyDataMapper2D * AngleArcMapper
void GetPoint2DisplayPosition(double pos[3])
vtkGetStringMacro(LabelSuffix)
vtkGetMacro(ArcRadius, double)
vtkSetMacro(ShowAngleArc, vtkTypeBool)
Control visibility of the angle arc.
int RenderOpaqueGeometry(vtkViewport *viewport) override
void SetPoint1DisplayPosition(double pos[3])
vtkTextActor * AngleLabelActor
void GetPoint2WorldPosition(double pos[3])
vtkTypeMacro(cvConstrainedPolyLineRepresentation, vtkPolyLineRepresentation)
vtkHandleRepresentation * GetPoint1Representation()
Compatibility: Get handle representations.
vtkBooleanMacro(ShowAngleLabel, vtkTypeBool)
void SetRenderer(vtkRenderer *ren) override
Set the renderer for this representation.
vtkActor2D * AngleArcActor
vtkTypeBool ShowAngleLabel
int RenderOverlay(vtkViewport *viewport) override
void GetPoint1WorldPosition(double pos[3])
vtkSetClampMacro(ArcRadius, double, 0.0, VTK_DOUBLE_MAX)
Set/Get the radius of the angle arc.
vtkSetMacro(ShowAngleLabel, vtkTypeBool)
Control visibility of the angle label.
void BuildAngleArc()
Build the angle arc geometry.
vtkHandleRepresentation * GetPoint2Representation()
void SetCenterDisplayPosition(double pos[3])
vtkBooleanMacro(ShowAngleArc, vtkTypeBool)
void GetCenterWorldPosition(double pos[3])
double GetAngle()
Calculate the angle formed by the three handles.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
vtkTypeBool HasTranslucentPolygonalGeometry() override
void GetActors2D(vtkPropCollection *pc) override
Render the angle representation.
void SetPoint2WorldPosition(double pos[3])
vtkGetMacro(ShowAngleArc, vtkTypeBool)
void InstantiateHandleRepresentation()
Compatibility: Instantiate handle representations.
void BuildRepresentation() override
Build the representation for the angle measurement.
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources.
~cvConstrainedPolyLineRepresentation() override
cvConstrainedPolyLineRepresentation()
vtkSetStringMacro(LabelSuffix)
Set/Get angle label suffix (e.g., " #1", " #2")
vtkGetObjectMacro(AngleLabelActor, vtkTextActor)
Get the angle label actor for custom styling.
vtkPolyData * AngleArcPolyData
void GetCenterDisplayPosition(double pos[3])
static cvConstrainedPolyLineRepresentation * New()
vtkHandleRepresentation * GetCenterRepresentation()
void SetCenterWorldPosition(double pos[3])
vtkGetObjectMacro(AngleArcActor, vtkActor2D)
Get the angle arc actor for custom styling.
void SetPoint1WorldPosition(double pos[3])
Compatibility API for vtkAngleRepresentation.
void SetPoint2DisplayPosition(double pos[3])
vtkGetMacro(ShowAngleLabel, vtkTypeBool)