![]() |
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:
|
protected |
References AngleArcActor, AngleArcMapper, AngleArcPolyData, and AngleLabelActor.
|
overrideprotected |
References AngleArcActor, AngleArcMapper, AngleArcPolyData, AngleLabelActor, and LabelSuffix.
|
protected |
Build the angle arc geometry.
References a, AngleArcPolyData, ArcRadius, and e.
Referenced by BuildRepresentation().
|
override |
Build the representation for the angle measurement.
Extends parent's BuildRepresentation to add:
References Angle, AngleArcActor, AngleLabelActor, ArcRadius, BuildAngleArc(), GetAngle(), LabelSuffix, ShowAngleArc, and ShowAngleLabel.
|
override |
Render the angle representation.
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|))
References e.
Referenced by BuildRepresentation().
| void cvConstrainedPolyLineRepresentation::GetCenterDisplayPosition | ( | double | pos[3] | ) |
| vtkHandleRepresentation * cvConstrainedPolyLineRepresentation::GetCenterRepresentation | ( | ) |
|
inline |
| void cvConstrainedPolyLineRepresentation::GetPoint1DisplayPosition | ( | double | pos[3] | ) |
| vtkHandleRepresentation * cvConstrainedPolyLineRepresentation::GetPoint1Representation | ( | ) |
Compatibility: Get handle representations.
These provide access to individual handle representations for direct manipulation if needed.
|
inline |
| void cvConstrainedPolyLineRepresentation::GetPoint2DisplayPosition | ( | double | pos[3] | ) |
| vtkHandleRepresentation * cvConstrainedPolyLineRepresentation::GetPoint2Representation | ( | ) |
|
inline |
|
override |
|
inline |
Compatibility: Instantiate handle representations.
This is called automatically when SetNumberOfHandles is called, but we provide it for API compatibility.
|
static |
|
override |
Release graphics resources.
References AngleArcActor, and AngleLabelActor.
|
override |
References AngleArcActor, count, and ShowAngleArc.
|
override |
References AngleArcActor, AngleLabelActor, count, ShowAngleArc, and ShowAngleLabel.
|
override |
References count.
| void cvConstrainedPolyLineRepresentation::SetCenterDisplayPosition | ( | double | pos[3] | ) |
|
inline |
| void cvConstrainedPolyLineRepresentation::SetPoint1DisplayPosition | ( | double | pos[3] | ) |
|
inline |
Compatibility API for vtkAngleRepresentation.
These methods provide the same interface as vtkAngleRepresentation for easier integration with existing code.
Mapping:
| void cvConstrainedPolyLineRepresentation::SetPoint2DisplayPosition | ( | double | pos[3] | ) |
|
inline |
|
override |
Set the renderer for this representation.
Override to ensure our custom 2D actors (angle label and arc) are properly added to the renderer.
References AngleArcActor, and AngleLabelActor.
|
override |
Override SetVisibility to also control arc and label actors.
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 |
Referenced by BuildRepresentation().
|
protected |
|
protected |
Referenced by cvConstrainedPolyLineRepresentation(), and ~cvConstrainedPolyLineRepresentation().
|
protected |
Referenced by BuildAngleArc(), cvConstrainedPolyLineRepresentation(), and ~cvConstrainedPolyLineRepresentation().
|
protected |
|
protected |
Referenced by BuildAngleArc(), and BuildRepresentation().
|
protected |
Referenced by BuildRepresentation(), and ~cvConstrainedPolyLineRepresentation().
|
protected |
Referenced by BuildRepresentation(), RenderOpaqueGeometry(), RenderOverlay(), and SetVisibility().
|
protected |
Referenced by BuildRepresentation(), RenderOverlay(), and SetVisibility().