26 #ifndef vtkOrientationRepresentation_h
27 #define vtkOrientationRepresentation_h
29 #include "vtkInteractionWidgetsModule.h"
36 VTK_ABI_NAMESPACE_BEGIN
75 virtual void SetOrientation(
double values[3]);
76 virtual void SetOrientationX(
double value);
77 virtual void SetOrientationY(
double value);
78 virtual void SetOrientationZ(
double value);
79 double* GetOrientation();
80 double GetOrientationX();
81 double GetOrientationY();
82 double GetOrientationZ();
91 void SetProperty(
int axis,
bool selected,
vtkProperty* property);
94 this->SetProperty(Axis::X_AXIS, selected, property);
98 this->SetProperty(Axis::Y_AXIS, selected, property);
102 this->SetProperty(Axis::Z_AXIS, selected, property);
117 vtkSetClampMacro(TorusLength,
double, MINIMUM_TORUS_LENGTH, MAXIMUM_TORUS_LENGTH);
118 vtkGetMacro(TorusLength,
double);
129 vtkSetClampMacro(TorusThickness,
double, MINIMUM_TORUS_THICKNESS, MAXIMUM_TORUS_THICKNESS);
130 vtkGetMacro(TorusThickness,
double);
138 vtkSetMacro(ShowArrows,
bool);
139 vtkGetMacro(ShowArrows,
bool);
140 vtkBooleanMacro(ShowArrows,
bool);
149 vtkSetClampMacro(ArrowDistance,
double, MINIMUM_ARROW_DISTANCE, MAXIMUM_ARROW_DISTANCE);
150 vtkGetMacro(ArrowDistance,
double);
162 vtkSetClampMacro(ArrowLength,
double, MINIMUM_ARROW_LENGTH, MAXIMUM_ARROW_LENGTH);
163 vtkGetMacro(ArrowLength,
double);
175 vtkSetMacro(ArrowTipLength,
double);
176 vtkGetMacro(ArrowTipLength,
double);
185 vtkSetClampMacro(ArrowTipRadius,
double, MINIMUM_ARROW_TIP_RADIUS, MAXIMUM_ARROW_TIP_RADIUS);
186 vtkGetMacro(ArrowTipRadius,
double);
196 ArrowShaftRadius,
double, MINIMUM_ARROW_SHAFT_RADIUS, MAXIMUM_ARROW_SHAFT_RADIUS);
197 vtkGetMacro(ArrowShaftRadius,
double);
216 void ReleaseGraphicsResources(
vtkWindow*) override;
218 int RenderTranslucentPolygonalGeometry(
vtkViewport*) override;
219 vtkTypeBool HasTranslucentPolygonalGeometry() override;
231 void SetInteractionState(
int state);
236 void RegisterPickers() override;
266 virtual void CreateDefaultProperties();
267 void UpdateGeometry();
268 void HighlightHandle();
282 void InitTransforms();
288 void Rotate(
const double p1[4],
const double p2[4],
const double baseVector[3]);
296 double LastEventPosition[3] = { 0.0 };
314 std::vector<vtkSmartPointer<vtkArrowSource>> ArrowSources;
315 std::vector<vtkSmartPointer<vtkSuperquadricSource>> TorusSources;
316 std::map<Axis, vtkNew<vtkActor>> TorusActors;
317 std::map<Axis, vtkNew<vtkActor>> ArrowsActors;
320 std::map<Axis, vtkSmartPointer<vtkProperty>> Properties;
321 std::map<Axis, vtkSmartPointer<vtkProperty>> SelectedProperties;
323 double TorusLength = 7.5;
324 double TorusThickness = 0.005;
326 bool ShowArrows =
false;
327 double ArrowDistance = 0.0;
328 double ArrowLength = 0.05;
329 double ArrowTipLength = 1.0;
330 double ArrowTipRadius = 0.03;
331 double ArrowShaftRadius = 0.001;
334 static constexpr
double MINIMUM_TORUS_THICKNESS = 0.001;
335 static constexpr
double MAXIMUM_TORUS_THICKNESS = 0.1;
336 static constexpr
double MINIMUM_TORUS_LENGTH = 0.01;
337 static constexpr
double MAXIMUM_TORUS_LENGTH = 100.0;
339 static constexpr
double MINIMUM_ARROW_DISTANCE = 0.0;
340 static constexpr
double MAXIMUM_ARROW_DISTANCE = 0.5;
341 static constexpr
double MINIMUM_ARROW_LENGTH = 0.01;
342 static constexpr
double MAXIMUM_ARROW_LENGTH = 0.5;
343 static constexpr
double MINIMUM_ARROW_TIP_RADIUS = 0.001;
344 static constexpr
double MAXIMUM_ARROW_TIP_RADIUS = 0.5;
345 static constexpr
double MINIMUM_ARROW_SHAFT_RADIUS = 0.001;
346 static constexpr
double MAXIMUM_ARROW_SHAFT_RADIUS = 0.5;
349 VTK_ABI_NAMESPACE_END
represents an object (geometry & properties) in a rendered scene
abstract specification for Viewports
represent surface properties of a geometric object
create a polygonal superquadric centered at the origin
vtkProperty * GetPropertyZ(bool selected)
Set/Get the properties values.
Hold a reference to a vtkObjectBase instance.
window superclass for vtkRenderWindow
vtkProperty * GetPropertyX(bool selected)
Set/Get the properties values.
vtkProperty * GetPropertyY(bool selected)
Set/Get the properties values.
a simple class to control print indentation
Appends a cylinder to a cone to form an arrow.
compute normals for polygonal mesh
#define VTK_SIZEHINT(...)
void SetPropertyX(bool selected, vtkProperty *property)
Set/Get the properties values.
a class defining the representation for the vtkOrientationWidget
ray-cast cell picker for all kinds of Prop3Ds
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
implicit function for a bounding box
void SetPropertyY(bool selected, vtkProperty *property)
Set/Get the properties values.
void SetPropertyZ(bool selected, vtkProperty *property)
Set/Get the properties values.