19#ifndef vtkCameraOrientationRepresentation_h
20#define vtkCameraOrientationRepresentation_h
22#include "vtkInteractionWidgetsModule.h"
26VTK_ABI_NAMESPACE_BEGIN
71 this->InteractionState =
72 this->InteractionState < 0 ? 0 : (this->InteractionState > 2 ? 2 : this->
InteractionState);
81 vtkSetVector2Macro(Size,
int);
82 vtkGetVector2Macro(Size,
int);
89 vtkSetVector2Macro(Padding,
int);
90 vtkGetVector2Macro(Padding,
int);
109 this->AnchorPosition = AnchorType::LowerLeft;
114 this->AnchorPosition = AnchorType::UpperLeft;
119 this->AnchorPosition = AnchorType::LowerRight;
124 this->AnchorPosition = AnchorType::UpperRight;
134 vtkSetMacro(TotalLength,
double);
135 vtkGetMacro(TotalLength,
double);
143 vtkSetMacro(NormalizedHandleDia,
double);
144 vtkGetMacro(NormalizedHandleDia,
double);
151 vtkGetMacro(Azimuth,
double);
152 vtkGetVector3Macro(Back,
double);
153 vtkGetMacro(Elevation,
double);
154 vtkGetVector3Macro(Up,
double);
161 vtkSetClampMacro(ShaftResolution,
int, 3, 256);
162 vtkGetMacro(ShaftResolution,
int);
169 vtkSetClampMacro(HandleCircumferentialResolution,
int, 3, 256);
170 vtkGetMacro(HandleCircumferentialResolution,
int);
177 vtkSetClampMacro(ContainerCircumferentialResolution,
int, 3, 256);
178 vtkGetMacro(ContainerCircumferentialResolution,
int);
185 vtkSetClampMacro(ContainerRadialResolution,
int, 3, 256);
186 vtkGetMacro(ContainerRadialResolution,
int);
193 vtkGetMacro(PickedAxis,
int);
194 vtkGetMacro(PickedDir,
int);
203 this->AxisLabelsText[0][0] = label;
209 this->AxisLabelsText[1][0] = label;
215 this->AxisLabelsText[2][0] = label;
227 this->AxisLabelsText[0][1] = label;
233 this->AxisLabelsText[1][1] = label;
239 this->AxisLabelsText[2][1] = label;
273 vtkBooleanMacro(ContainerVisibility,
bool);
320 bool IsAnyHandleSelected() {
return (this->PickedAxis != -1) && (this->PickedDir != -1); }
330 virtual void Rotate(
double newEventPos[2]);
363 int Padding[2] = { 10, 10 };
364 int Size[2] = { 120, 120 };
367 std::string AxisLabelsText[3][2] = { {
"X",
"-X" }, {
"Y",
"-Y" }, {
"Z",
"-Z" } };
369 double Back[3] = { 0., 0., -1. };
370 double Bounds[6] = {};
371 double Elevation = 0.;
372 double MotionFactor = 1.;
373 double NormalizedHandleDia = 0.4;
374 double TotalLength = 1.;
375 double Up[3] = { 0., 1., 0. };
376 int ContainerCircumferentialResolution = 32;
377 int ContainerRadialResolution = 1;
378 int HandleCircumferentialResolution = 32;
379 int ShaftResolution = 10;
383 int LastPickedAx = -1;
385 int LastPickedDir = -1;
388 double LastEventPosition[3] = {};
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 * GetXPlusLabelProperty()
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()
vtkTextProperty * GetXMinusLabelProperty()
Get the '-' axis label properties.
void GetActors(vtkPropCollection *) override
For some exporters and other other operations we must be able to collect all the actors or volumes.
std::string GetYPlusLabelText()
Set/Get the '+' axis label text.
void SetZPlusLabelText(const std::string &label)
Set/Get the '+' axis label text.
void SetYMinusLabelText(const std::string &label)
Set/Get the '-' axis label text.
vtkNew< vtkActor > Container
void AnchorToLowerLeft()
Get/Set the widget anchor type.
std::string GetZMinusLabelText()
Set/Get the '-' axis label text.
std::string GetXMinusLabelText()
Set/Get the '-' axis label text.
vtkTextProperty * GetZMinusLabelProperty()
Get the '-' axis label properties.
vtkNew< vtkPolyData > Skeleton
void AnchorToLowerRight()
Get/Set the widget anchor type.
vtkTextProperty * GetYMinusLabelProperty()
Get the '-' axis label properties.
void RegisterPickers() override
Register internal Pickers in the Picking Manager.
virtual void CreateDefaultProperties()
vtkTextProperty * GetZPlusLabelProperty()
Get the '+' axis label properties.
virtual void Rotate(double newEventPos[2])
std::string GetZPlusLabelText()
Set/Get the '+' axis label text.
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()
std::string GetXPlusLabelText()
Set/Get the '+' axis label text.
vtkNew< vtkPropPicker > HandlePicker
vtkNew< vtkTubeFilter > ShaftGlyphs
vtkSetEnumMacro(AnchorPosition, AnchorType)
Get/Set the widget anchor type.
vtkGetEnumMacro(AnchorPosition, AnchorType)
Get/Set the widget anchor type.
void SetZMinusLabelText(const std::string &label)
Set/Get the '-' axis label text.
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.
void SetXPlusLabelText(const std::string &label)
Set/Get the '+' axis label text.
vtkTransform * GetTransform()
Retrieve internal transform of this widget representation.
void ApplyInteractionState(const InteractionStateType &state)
The interaction state may be set from a widget (e.g., vtkCameraOrientationWidget) or other object.
void SetYPlusLabelText(const std::string &label)
Set/Get the '+' axis label text.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
std::string GetYMinusLabelText()
Set/Get the '-' axis label text.
void FinalizeHandlePicks()
static vtkCameraOrientationRepresentation * New()
void EndWidgetInteraction(double newEventPos[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
void SetContainerVisibility(bool state)
Show container to indicate mouse presence.
vtkTextProperty * GetYPlusLabelProperty()
Get the '+' axis label properties.
InteractionStateType GetInteractionStateAsEnum() noexcept
Convenient method to get InteractionState as enum.
virtual void PositionHandles()
vtkNew< vtkTransform > Transform
double * GetBounds() override
These are methods that satisfy vtkWidgetRepresentation's API.
vtkNew< vtkPoints > Points
void ApplyInteractionState(const int &state)
vtkProperty * GetContainerProperty()
Get the container property.
void AnchorToUpperLeft()
Get/Set the widget anchor type.
vtkNew< vtkDiskSource > ContainerSource
virtual void CreateDefaultGeometry()
void SetXMinusLabelText(const std::string &label)
Set/Get the '-' axis label text.
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
Allocate and hold a VTK object.
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(...)