![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Extended PolyLineRepresentation adding angle display functionality. More...
#include <cvConstrainedPolyLineRepresentation.h>


Public Member Functions | |
| vtkTypeMacro (cvConstrainedPolyLineRepresentation, vtkPolyLineRepresentation) | |
| void | BuildRepresentation () override |
| Build the representation for the angle measurement. More... | |
| void | SetRenderer (vtkRenderer *ren) override |
| Set the renderer for this representation. More... | |
| double | GetAngle () |
| Calculate the angle formed by the three handles. More... | |
| vtkGetObjectMacro (AngleLabelActor, vtkTextActor) | |
| Get the angle label actor for custom styling. More... | |
| vtkGetObjectMacro (AngleArcActor, vtkActor2D) | |
| Get the angle arc actor for custom styling. More... | |
| void | ReleaseGraphicsResources (vtkWindow *w) override |
| Release graphics resources. More... | |
| void | GetActors2D (vtkPropCollection *pc) override |
| Render the angle representation. More... | |
| int | RenderOverlay (vtkViewport *viewport) override |
| int | RenderOpaqueGeometry (vtkViewport *viewport) override |
| int | RenderTranslucentPolygonalGeometry (vtkViewport *viewport) override |
| vtkTypeBool | HasTranslucentPolygonalGeometry () override |
| void | SetPoint1WorldPosition (double pos[3]) |
| Compatibility API for vtkAngleRepresentation. More... | |
| void | GetPoint1WorldPosition (double pos[3]) |
| void | SetPoint1DisplayPosition (double pos[3]) |
| void | GetPoint1DisplayPosition (double pos[3]) |
| void | SetCenterWorldPosition (double pos[3]) |
| void | GetCenterWorldPosition (double pos[3]) |
| void | SetCenterDisplayPosition (double pos[3]) |
| void | GetCenterDisplayPosition (double pos[3]) |
| void | SetPoint2WorldPosition (double pos[3]) |
| void | GetPoint2WorldPosition (double pos[3]) |
| void | SetPoint2DisplayPosition (double pos[3]) |
| void | GetPoint2DisplayPosition (double pos[3]) |
| vtkHandleRepresentation * | GetPoint1Representation () |
| Compatibility: Get handle representations. More... | |
| vtkHandleRepresentation * | GetCenterRepresentation () |
| vtkHandleRepresentation * | GetPoint2Representation () |
| void | InstantiateHandleRepresentation () |
| Compatibility: Instantiate handle representations. More... | |
| void | SetVisibility (vtkTypeBool visible) override |
| Override SetVisibility to also control arc and label actors. More... | |
| vtkSetMacro (ShowAngleLabel, vtkTypeBool) | |
| Control visibility of the angle label. More... | |
| vtkGetMacro (ShowAngleLabel, vtkTypeBool) | |
| vtkBooleanMacro (ShowAngleLabel, vtkTypeBool) | |
| vtkSetStringMacro (LabelSuffix) | |
| Set/Get angle label suffix (e.g., " #1", " #2") More... | |
| vtkGetStringMacro (LabelSuffix) | |
| vtkSetMacro (ShowAngleArc, vtkTypeBool) | |
| Control visibility of the angle arc. More... | |
| vtkGetMacro (ShowAngleArc, vtkTypeBool) | |
| vtkBooleanMacro (ShowAngleArc, vtkTypeBool) | |
| vtkSetClampMacro (ArcRadius, double, 0.0, VTK_DOUBLE_MAX) | |
| Set/Get the radius of the angle arc. More... | |
| vtkGetMacro (ArcRadius, double) | |
Static Public Member Functions | |
| static cvConstrainedPolyLineRepresentation * | New () |
Protected Member Functions | |
| cvConstrainedPolyLineRepresentation () | |
| ~cvConstrainedPolyLineRepresentation () override | |
| void | BuildAngleArc () |
| Build the angle arc geometry. More... | |
Protected Attributes | |
| vtkTypeBool | ShowAngleLabel |
| vtkTypeBool | ShowAngleArc |
| double | ArcRadius |
| double | Angle |
| char * | LabelSuffix |
| vtkTextActor * | AngleLabelActor |
| vtkActor2D * | AngleArcActor |
| vtkPolyDataMapper2D * | AngleArcMapper |
| vtkPolyData * | AngleArcPolyData |
Extended PolyLineRepresentation adding angle display functionality.
This extends vtkPolyLineRepresentation to add angle visualization for 3-point angle measurement (Point1-Center-Point2), following ParaView's approach.
Key features:
Definition at line 35 of file cvConstrainedPolyLineRepresentation.h.
|
protected |
Definition at line 31 of file cvConstrainedPolyLineRepresentation.cpp.
References AngleArcActor, AngleArcMapper, AngleArcPolyData, and AngleLabelActor.
|
overrideprotected |
Definition at line 65 of file cvConstrainedPolyLineRepresentation.cpp.
References AngleArcActor, AngleArcMapper, AngleArcPolyData, AngleLabelActor, and LabelSuffix.
|
protected |
Build the angle arc geometry.
Definition at line 316 of file cvConstrainedPolyLineRepresentation.cpp.
References a, AngleArcPolyData, ArcRadius, and e.
Referenced by BuildRepresentation().
|
override |
Build the representation for the angle measurement.
Extends parent's BuildRepresentation to add:
Definition at line 123 of file cvConstrainedPolyLineRepresentation.cpp.
References Angle, AngleArcActor, AngleLabelActor, ArcRadius, BuildAngleArc(), GetAngle(), LabelSuffix, ShowAngleArc, and ShowAngleLabel.
|
override |
Render the angle representation.
Definition at line 442 of file cvConstrainedPolyLineRepresentation.cpp.
References AngleArcActor, and AngleLabelActor.
| double cvConstrainedPolyLineRepresentation::GetAngle | ( | ) |
Calculate the angle formed by the three handles.
Following ParaView pqAnglePropertyWidget::updateLabels() implementation: angle = acos(vec1.dot(vec2) / (|vec1| * |vec2|))
Definition at line 278 of file cvConstrainedPolyLineRepresentation.cpp.
References e.
Referenced by BuildRepresentation().
| void cvConstrainedPolyLineRepresentation::GetCenterDisplayPosition | ( | double | pos[3] | ) |
Definition at line 549 of file cvConstrainedPolyLineRepresentation.cpp.
| vtkHandleRepresentation * cvConstrainedPolyLineRepresentation::GetCenterRepresentation | ( | ) |
Definition at line 603 of file cvConstrainedPolyLineRepresentation.cpp.
|
inline |
Definition at line 93 of file cvConstrainedPolyLineRepresentation.h.
| void cvConstrainedPolyLineRepresentation::GetPoint1DisplayPosition | ( | double | pos[3] | ) |
Definition at line 519 of file cvConstrainedPolyLineRepresentation.cpp.
| vtkHandleRepresentation * cvConstrainedPolyLineRepresentation::GetPoint1Representation | ( | ) |
Compatibility: Get handle representations.
These provide access to individual handle representations for direct manipulation if needed.
Definition at line 595 of file cvConstrainedPolyLineRepresentation.cpp.
|
inline |
Definition at line 84 of file cvConstrainedPolyLineRepresentation.h.
| void cvConstrainedPolyLineRepresentation::GetPoint2DisplayPosition | ( | double | pos[3] | ) |
Definition at line 579 of file cvConstrainedPolyLineRepresentation.cpp.
| vtkHandleRepresentation * cvConstrainedPolyLineRepresentation::GetPoint2Representation | ( | ) |
Definition at line 608 of file cvConstrainedPolyLineRepresentation.cpp.
|
inline |
Definition at line 102 of file cvConstrainedPolyLineRepresentation.h.
|
override |
Definition at line 497 of file cvConstrainedPolyLineRepresentation.cpp.
|
inline |
Compatibility: Instantiate handle representations.
This is called automatically when SetNumberOfHandles is called, but we provide it for API compatibility.
Definition at line 124 of file cvConstrainedPolyLineRepresentation.h.
|
static |
|
override |
Release graphics resources.
Definition at line 455 of file cvConstrainedPolyLineRepresentation.cpp.
References AngleArcActor, and AngleLabelActor.
|
override |
Definition at line 479 of file cvConstrainedPolyLineRepresentation.cpp.
References AngleArcActor, count, and ShowAngleArc.
|
override |
Definition at line 466 of file cvConstrainedPolyLineRepresentation.cpp.
References AngleArcActor, AngleLabelActor, count, ShowAngleArc, and ShowAngleLabel.
|
override |
Definition at line 490 of file cvConstrainedPolyLineRepresentation.cpp.
References count.
| void cvConstrainedPolyLineRepresentation::SetCenterDisplayPosition | ( | double | pos[3] | ) |
Definition at line 533 of file cvConstrainedPolyLineRepresentation.cpp.
|
inline |
Definition at line 90 of file cvConstrainedPolyLineRepresentation.h.
| void cvConstrainedPolyLineRepresentation::SetPoint1DisplayPosition | ( | double | pos[3] | ) |
Definition at line 502 of file cvConstrainedPolyLineRepresentation.cpp.
|
inline |
Compatibility API for vtkAngleRepresentation.
These methods provide the same interface as vtkAngleRepresentation for easier integration with existing code.
Mapping:
Definition at line 81 of file cvConstrainedPolyLineRepresentation.h.
| void cvConstrainedPolyLineRepresentation::SetPoint2DisplayPosition | ( | double | pos[3] | ) |
Definition at line 563 of file cvConstrainedPolyLineRepresentation.cpp.
|
inline |
Definition at line 99 of file cvConstrainedPolyLineRepresentation.h.
|
override |
Set the renderer for this representation.
Override to ensure our custom 2D actors (angle label and arc) are properly added to the renderer.
Definition at line 98 of file cvConstrainedPolyLineRepresentation.cpp.
References AngleArcActor, and AngleLabelActor.
|
override |
Override SetVisibility to also control arc and label actors.
Definition at line 420 of file cvConstrainedPolyLineRepresentation.cpp.
References AngleArcActor, AngleLabelActor, ShowAngleArc, and ShowAngleLabel.
| cvConstrainedPolyLineRepresentation::vtkBooleanMacro | ( | ShowAngleArc | , |
| vtkTypeBool | |||
| ) |
| cvConstrainedPolyLineRepresentation::vtkBooleanMacro | ( | ShowAngleLabel | , |
| vtkTypeBool | |||
| ) |
| cvConstrainedPolyLineRepresentation::vtkGetMacro | ( | ArcRadius | , |
| double | |||
| ) |
| cvConstrainedPolyLineRepresentation::vtkGetMacro | ( | ShowAngleArc | , |
| vtkTypeBool | |||
| ) |
| cvConstrainedPolyLineRepresentation::vtkGetMacro | ( | ShowAngleLabel | , |
| vtkTypeBool | |||
| ) |
| cvConstrainedPolyLineRepresentation::vtkGetObjectMacro | ( | AngleArcActor | , |
| vtkActor2D | |||
| ) |
Get the angle arc actor for custom styling.
| cvConstrainedPolyLineRepresentation::vtkGetObjectMacro | ( | AngleLabelActor | , |
| vtkTextActor | |||
| ) |
Get the angle label actor for custom styling.
| cvConstrainedPolyLineRepresentation::vtkGetStringMacro | ( | LabelSuffix | ) |
| cvConstrainedPolyLineRepresentation::vtkSetClampMacro | ( | ArcRadius | , |
| double | , | ||
| 0. | 0, | ||
| VTK_DOUBLE_MAX | |||
| ) |
Set/Get the radius of the angle arc.
| cvConstrainedPolyLineRepresentation::vtkSetMacro | ( | ShowAngleArc | , |
| vtkTypeBool | |||
| ) |
Control visibility of the angle arc.
| cvConstrainedPolyLineRepresentation::vtkSetMacro | ( | ShowAngleLabel | , |
| vtkTypeBool | |||
| ) |
Control visibility of the angle label.
| cvConstrainedPolyLineRepresentation::vtkSetStringMacro | ( | LabelSuffix | ) |
Set/Get angle label suffix (e.g., " #1", " #2")
| cvConstrainedPolyLineRepresentation::vtkTypeMacro | ( | cvConstrainedPolyLineRepresentation | , |
| vtkPolyLineRepresentation | |||
| ) |
|
protected |
Definition at line 206 of file cvConstrainedPolyLineRepresentation.h.
Referenced by BuildRepresentation().
|
protected |
Definition at line 213 of file cvConstrainedPolyLineRepresentation.h.
Referenced by BuildRepresentation(), cvConstrainedPolyLineRepresentation(), GetActors2D(), ReleaseGraphicsResources(), RenderOpaqueGeometry(), RenderOverlay(), SetRenderer(), SetVisibility(), and ~cvConstrainedPolyLineRepresentation().
|
protected |
Definition at line 214 of file cvConstrainedPolyLineRepresentation.h.
Referenced by cvConstrainedPolyLineRepresentation(), and ~cvConstrainedPolyLineRepresentation().
|
protected |
Definition at line 215 of file cvConstrainedPolyLineRepresentation.h.
Referenced by BuildAngleArc(), cvConstrainedPolyLineRepresentation(), and ~cvConstrainedPolyLineRepresentation().
|
protected |
Definition at line 210 of file cvConstrainedPolyLineRepresentation.h.
Referenced by BuildRepresentation(), cvConstrainedPolyLineRepresentation(), GetActors2D(), ReleaseGraphicsResources(), RenderOverlay(), SetRenderer(), SetVisibility(), and ~cvConstrainedPolyLineRepresentation().
|
protected |
Definition at line 205 of file cvConstrainedPolyLineRepresentation.h.
Referenced by BuildAngleArc(), and BuildRepresentation().
|
protected |
Definition at line 207 of file cvConstrainedPolyLineRepresentation.h.
Referenced by BuildRepresentation(), and ~cvConstrainedPolyLineRepresentation().
|
protected |
Definition at line 204 of file cvConstrainedPolyLineRepresentation.h.
Referenced by BuildRepresentation(), RenderOpaqueGeometry(), RenderOverlay(), and SetVisibility().
|
protected |
Definition at line 203 of file cvConstrainedPolyLineRepresentation.h.
Referenced by BuildRepresentation(), RenderOverlay(), and SetVisibility().