26#ifndef vtkOrientationRepresentation_h
27#define vtkOrientationRepresentation_h
29#include "vtkInteractionWidgetsModule.h"
37VTK_ABI_NAMESPACE_BEGIN
96 this->SetProperty(Axis::X_AXIS, selected, property);
100 this->SetProperty(Axis::Y_AXIS, selected, property);
104 this->SetProperty(Axis::Z_AXIS, selected, property);
119 vtkSetClampMacro(TorusLength,
double, MINIMUM_TORUS_LENGTH, MAXIMUM_TORUS_LENGTH);
120 vtkGetMacro(TorusLength,
double);
131 vtkSetClampMacro(TorusThickness,
double, MINIMUM_TORUS_THICKNESS, MAXIMUM_TORUS_THICKNESS);
132 vtkGetMacro(TorusThickness,
double);
140 vtkSetMacro(ShowArrows,
bool);
141 vtkGetMacro(ShowArrows,
bool);
142 vtkBooleanMacro(ShowArrows,
bool);
151 vtkSetClampMacro(ArrowDistance,
double, MINIMUM_ARROW_DISTANCE, MAXIMUM_ARROW_DISTANCE);
152 vtkGetMacro(ArrowDistance,
double);
164 vtkSetClampMacro(ArrowLength,
double, MINIMUM_ARROW_LENGTH, MAXIMUM_ARROW_LENGTH);
165 vtkGetMacro(ArrowLength,
double);
177 vtkSetMacro(ArrowTipLength,
double);
178 vtkGetMacro(ArrowTipLength,
double);
187 vtkSetClampMacro(ArrowTipRadius,
double, MINIMUM_ARROW_TIP_RADIUS, MAXIMUM_ARROW_TIP_RADIUS);
188 vtkGetMacro(ArrowTipRadius,
double);
198 ArrowShaftRadius,
double, MINIMUM_ARROW_SHAFT_RADIUS, MAXIMUM_ARROW_SHAFT_RADIUS);
199 vtkGetMacro(ArrowShaftRadius,
double);
233 void SetInteractionState(
int state);
238 void RegisterPickers() override;
284 void InitTransforms();
290 void Rotate(
const double p1[4],
const double p2[4],
const double baseVector[3]);
298 double LastEventPosition[3] = { 0.0 };
316 std::vector<vtkSmartPointer<vtkArrowSource>> ArrowSources;
317 std::vector<vtkSmartPointer<vtkSuperquadricSource>> TorusSources;
318 std::map<Axis, vtkNew<vtkActor>> TorusActors;
319 std::map<Axis, vtkNew<vtkActor>> ArrowsActors;
322 std::map<Axis, vtkSmartPointer<vtkProperty>> Properties;
323 std::map<Axis, vtkSmartPointer<vtkProperty>> SelectedProperties;
325 double TorusLength = 7.5;
326 double TorusThickness = 0.005;
328 bool ShowArrows =
false;
329 double ArrowDistance = 0.0;
330 double ArrowLength = 0.05;
331 double ArrowTipLength = 1.0;
332 double ArrowTipRadius = 0.03;
333 double ArrowShaftRadius = 0.001;
336 static constexpr double MINIMUM_TORUS_THICKNESS = 0.001;
337 static constexpr double MAXIMUM_TORUS_THICKNESS = 0.1;
338 static constexpr double MINIMUM_TORUS_LENGTH = 0.01;
339 static constexpr double MAXIMUM_TORUS_LENGTH = 100.0;
341 static constexpr double MINIMUM_ARROW_DISTANCE = 0.0;
342 static constexpr double MAXIMUM_ARROW_DISTANCE = 0.5;
343 static constexpr double MINIMUM_ARROW_LENGTH = 0.01;
344 static constexpr double MAXIMUM_ARROW_LENGTH = 0.5;
345 static constexpr double MINIMUM_ARROW_TIP_RADIUS = 0.001;
346 static constexpr double MAXIMUM_ARROW_TIP_RADIUS = 0.5;
347 static constexpr double MINIMUM_ARROW_SHAFT_RADIUS = 0.001;
348 static constexpr double MAXIMUM_ARROW_SHAFT_RADIUS = 0.5;
represents an object (geometry & properties) in a rendered scene
Appends a cylinder to a cone to form an arrow.
implicit function for a bounding box
ray-cast cell picker for all kinds of Prop3Ds
a simple class to control print indentation
Allocate and hold a VTK object.
a class defining the representation for the vtkOrientationWidget
virtual void SetOrientation(double values[3])
Set/Get the orientation values.
virtual void SetOrientationX(double value)
Set/Get the orientation values.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
vtkProperty * GetPropertyZ(bool selected)
Set/Get the properties values.
void SetPropertyX(bool selected, vtkProperty *property)
Set/Get the properties values.
static vtkOrientationRepresentation * New()
Instantiate the class.
vtkOrientationRepresentation()
vtkProperty * GetPropertyY(bool selected)
Set/Get the properties values.
~vtkOrientationRepresentation() override
void SetPropertyZ(bool selected, vtkProperty *property)
Set/Get the properties values.
double GetOrientationY()
Set/Get the orientation values.
virtual void SetOrientationZ(double value)
Set/Get the orientation values.
vtkProperty * GetProperty(int axis, bool selected)
Set/Get the properties values.
void PlaceWidget(double bounds[6]) override
These are methods that satisfy vtkWidgetRepresentation's API.
virtual void SetOrientationY(double value)
Set/Get the orientation values.
double * GetBounds() override
These are methods that satisfy vtkWidgetRepresentation's API.
void SetPropertyY(bool selected, vtkProperty *property)
Set/Get the properties values.
double GetOrientationZ()
Set/Get the orientation values.
vtkProperty * GetPropertyX(bool selected)
Set/Get the properties values.
double * GetOrientation()
Set/Get the orientation values.
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.
double GetOrientationX()
Set/Get the orientation values.
virtual void CreateDefaultProperties()
vtkTransform * GetTransform()
Get the orientation transform.
void StartWidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
int ComputeInteractionState(int X, int Y, int modify=0) override
These are methods that satisfy vtkWidgetRepresentation's API.
void WidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
void SetProperty(int axis, bool selected, vtkProperty *property)
Set/Get the properties values.
compute normals for polygonal mesh
represent surface properties of a geometric object
Hold a reference to a vtkObjectBase instance.
create a polygonal superquadric centered at the origin
abstract specification for Viewports
window superclass for vtkRenderWindow
#define VTK_SIZEHINT(...)