19 #ifndef vtkCameraOrientationRepresentation_h
20 #define vtkCameraOrientationRepresentation_h
22 #include "vtkInteractionWidgetsModule.h"
25 VTK_ABI_NAMESPACE_BEGIN
70 this->InteractionState =
71 this->InteractionState < 0 ? 0 : (this->InteractionState > 2 ? 2 : this->
InteractionState);
80 vtkSetVector2Macro(Size,
int);
81 vtkGetVector2Macro(Size,
int);
88 vtkSetVector2Macro(Padding,
int);
89 vtkGetVector2Macro(Padding,
int);
107 this->AnchorPosition = AnchorType::LowerLeft;
112 this->AnchorPosition = AnchorType::UpperLeft;
117 this->AnchorPosition = AnchorType::LowerRight;
122 this->AnchorPosition = AnchorType::UpperRight;
132 vtkSetMacro(TotalLength,
double);
133 vtkGetMacro(TotalLength,
double);
141 vtkSetMacro(NormalizedHandleDia,
double);
142 vtkGetMacro(NormalizedHandleDia,
double);
149 vtkGetMacro(Azimuth,
double);
150 vtkGetVector3Macro(Back,
double);
151 vtkGetMacro(Elevation,
double);
152 vtkGetVector3Macro(Up,
double);
159 vtkSetClampMacro(ShaftResolution,
int, 3, 256);
160 vtkGetMacro(ShaftResolution,
int);
167 vtkSetClampMacro(HandleCircumferentialResolution,
int, 3, 256);
168 vtkGetMacro(HandleCircumferentialResolution,
int);
175 vtkSetClampMacro(ContainerCircumferentialResolution,
int, 3, 256);
176 vtkGetMacro(ContainerCircumferentialResolution,
int);
183 vtkSetClampMacro(ContainerRadialResolution,
int, 3, 256);
184 vtkGetMacro(ContainerRadialResolution,
int);
191 vtkGetMacro(PickedAxis,
int);
192 vtkGetMacro(PickedDir,
int);
223 vtkBooleanMacro(ContainerVisibility,
bool);
270 bool IsAnyHandleSelected() {
return (this->PickedAxis != -1) && (this->PickedDir != -1); }
280 virtual void Rotate(
double newEventPos[2]);
313 int Padding[2] = { 10, 10 };
314 int Size[2] = { 120, 120 };
317 const char* AxisLabelsText[3][2] = { {
"X",
"-X" }, {
"Y",
"-Y" }, {
"Z",
"-Z" } };
319 double Back[3] = { 0., 0., -1. };
320 double Bounds[6] = {};
321 double Elevation = 0.;
322 double MotionFactor = 1.;
323 double NormalizedHandleDia = 0.4;
324 double TotalLength = 1.;
325 double Up[3] = { 0., 1., 0. };
326 int ContainerCircumferentialResolution = 32;
327 int ContainerRadialResolution = 1;
328 int HandleCircumferentialResolution = 32;
329 int ShaftResolution = 10;
333 int LastPickedAx = -1;
335 int LastPickedDir = -1;
338 double LastEventPosition[3] = {};
345 VTK_ABI_NAMESPACE_END
represents an object (geometry & properties) in a rendered scene
A 3D representation for vtkCameraOrientationWidget.
void StartWidgetInteraction(double eventPos[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
vtkNew< vtkActor > Shafts
vtkTextProperty * GetXMinusLabelProperty()
Get the '-' axis label properties.
void AnchorToUpperRight()
Get/Set the widget anchor type.
~vtkCameraOrientationRepresentation() override
void PlaceWidget(double *) override
These are methods that satisfy vtkWidgetRepresentation's API.
virtual void HighlightHandle()
void GetActors(vtkPropCollection *) override
For some exporters and other other operations we must be able to collect all the actors or volumes.
vtkNew< vtkActor > Container
void AnchorToLowerLeft()
Get/Set the widget anchor type.
vtkTextProperty * GetZMinusLabelProperty()
Get the '-' axis label properties.
double * GetBounds() override
These are methods that satisfy vtkWidgetRepresentation's API.
static vtkCameraOrientationRepresentation * New()
vtkNew< vtkPolyData > Skeleton
void AnchorToLowerRight()
Get/Set the widget anchor type.
vtkTransform * GetTransform()
Retrieve internal transform of this widget representation.
vtkProperty * GetContainerProperty()
Get the container property.
void RegisterPickers() override
Register internal Pickers in the Picking Manager.
virtual void CreateDefaultProperties()
virtual void Rotate(double newEventPos[2])
vtkNew< vtkDoubleArray > AxesColors
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.
void WidgetInteraction(double newEventPos[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
vtkCameraOrientationRepresentation()
vtkNew< vtkPropPicker > HandlePicker
vtkNew< vtkTubeFilter > ShaftGlyphs
vtkTextProperty * GetYPlusLabelProperty()
Get the '+' axis label properties.
AnchorType GetAnchorPosition()
Get/Set the widget anchor type.
bool GetContainerVisibility()
Show container to indicate mouse presence.
int ComputeInteractionState(int X, int Y, int modify=0) override
These are methods that satisfy vtkWidgetRepresentation's API.
vtkTextProperty * GetZPlusLabelProperty()
Get the '+' axis label properties.
void ApplyInteractionState(const InteractionStateType &state)
The interaction state may be set from a widget (e.g., vtkCameraOrientationWidget) or other object.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void FinalizeHandlePicks()
vtkTextProperty * GetXPlusLabelProperty()
Get the '+' axis label properties.
void EndWidgetInteraction(double newEventPos[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
void SetContainerVisibility(bool state)
Show container to indicate mouse presence.
InteractionStateType GetInteractionStateAsEnum() noexcept
Convenient method to get InteractionState as enum.
virtual void PositionHandles()
vtkNew< vtkTransform > Transform
vtkNew< vtkPoints > Points
vtkTextProperty * GetYMinusLabelProperty()
Get the '-' axis label properties.
void ApplyInteractionState(const int &state)
void AnchorToUpperLeft()
Get/Set the widget anchor type.
vtkNew< vtkDiskSource > ContainerSource
virtual void CreateDefaultGeometry()
create a disk with hole in center
dynamic, self-adjusting array of double
topologically and geometrically regular array of data
a simple class to control print indentation
virtual void Modified()
Update the modification time for this object.
represent and manipulate 3D points
concrete dataset represents vertices, lines, polygons, and triangle strips
pick an actor/prop using graphics hardware
abstract superclass for all actors, volumes and annotations
represent surface properties of a geometric object
represent text properties.
handles properties associated with a texture map
filter that generates tubes around lines
abstract specification for Viewports
window superclass for vtkRenderWindow
#define VTK_SIZEHINT(...)