19 #ifndef vtkCameraOrientationRepresentation_h
20 #define vtkCameraOrientationRepresentation_h
22 #include "vtkInteractionWidgetsModule.h"
28 VTK_ABI_NAMESPACE_BEGIN
62 void ApplyInteractionState(
const InteractionStateType& state);
63 void ApplyInteractionState(
const int& state);
73 this->InteractionState = std::min(
std::max(this->InteractionState, 0), 2);
82 vtkSetVector2Macro(Size,
int);
83 vtkGetVector2Macro(Size,
int);
90 vtkSetVector2Macro(Padding,
int);
91 vtkGetVector2Macro(Padding,
int);
106 vtkSetEnumMacro(AnchorPosition, AnchorType);
107 vtkGetEnumMacro(AnchorPosition, AnchorType);
110 this->AnchorPosition = AnchorType::LowerLeft;
115 this->AnchorPosition = AnchorType::UpperLeft;
120 this->AnchorPosition = AnchorType::LowerRight;
125 this->AnchorPosition = AnchorType::UpperRight;
135 vtkSetMacro(TotalLength,
double);
136 vtkGetMacro(TotalLength,
double);
144 vtkSetMacro(NormalizedHandleDia,
double);
145 vtkGetMacro(NormalizedHandleDia,
double);
152 vtkGetMacro(Azimuth,
double);
153 vtkGetVector3Macro(Back,
double);
154 vtkGetMacro(Elevation,
double);
155 vtkGetVector3Macro(Up,
double);
162 vtkSetClampMacro(ShaftResolution,
int, 3, 256);
163 vtkGetMacro(ShaftResolution,
int);
170 vtkSetClampMacro(HandleCircumferentialResolution,
int, 3, 256);
171 vtkGetMacro(HandleCircumferentialResolution,
int);
178 vtkSetClampMacro(ContainerCircumferentialResolution,
int, 3, 256);
179 vtkGetMacro(ContainerCircumferentialResolution,
int);
186 vtkSetClampMacro(ContainerRadialResolution,
int, 3, 256);
187 vtkGetMacro(ContainerRadialResolution,
int);
194 vtkGetMacro(PickedAxis,
int);
195 vtkGetMacro(PickedDir,
int);
204 this->AxisLabelsText[0][0] = label;
210 this->AxisLabelsText[1][0] = label;
216 this->AxisLabelsText[2][0] = label;
228 this->AxisLabelsText[0][1] = label;
234 this->AxisLabelsText[1][1] = label;
240 this->AxisLabelsText[2][1] = label;
268 void SetXAxisColor(
double color[3]);
269 void SetXAxisColor(
double,
double,
double);
276 void SetYAxisColor(
double color[3]);
277 void SetYAxisColor(
double,
double,
double);
284 void SetZAxisColor(
double color[3]);
285 void SetZAxisColor(
double,
double,
double);
292 void SetAxisColor(
int ax,
double color[3]);
293 void SetAxisColor(
int ax,
double,
double,
double);
301 void GetXAxisColor(
double color[3]);
309 void GetYAxisColor(
double color[3]);
316 double* GetZAxisColor() VTK_SIZEHINT(3);
317 void GetZAxisColor(
double color[3]);
324 double* GetAxisColor(
int ax) VTK_SIZEHINT(3);
325 void GetAxisColor(
int ax,
double color[3]);
337 void SetContainerVisibility(
bool state);
338 vtkBooleanMacro(ContainerVisibility,
bool);
339 bool GetContainerVisibility();
358 void PlaceWidget(
double*)
override {}
371 void ReleaseGraphicsResources(
vtkWindow*) override;
373 int RenderTranslucentPolygonalGeometry(
vtkViewport*) override;
374 vtkTypeBool HasTranslucentPolygonalGeometry() override;
380 void ShallowCopy(
vtkProp* prop) override;
385 bool IsAnyHandleSelected() {
return (this->PickedAxis != -1) && (this->PickedDir != -1); }
391 virtual void CreateDefaultGeometry();
392 virtual void CreateDefaultProperties();
393 virtual void PositionHandles();
394 virtual void HighlightHandle();
395 virtual void Rotate(
double newEventPos[2]);
397 void FinalizeHandlePicks();
428 int Padding[2] = { 10, 10 };
429 int Size[2] = { 120, 120 };
432 std::string AxisLabelsText[3][2] = { {
"X",
"-X" }, {
"Y",
"-Y" }, {
"Z",
"-Z" } };
434 double Back[3] = { 0., 0., -1. };
435 double Bounds[6] = {};
436 double Elevation = 0.;
437 double MotionFactor = 1.;
438 double NormalizedHandleDia = 0.4;
439 double TotalLength = 1.;
440 double Up[3] = { 0., 1., 0. };
441 int ContainerCircumferentialResolution = 32;
442 int ContainerRadialResolution = 1;
443 int HandleCircumferentialResolution = 32;
444 int ShaftResolution = 10;
448 int LastPickedAx = -1;
450 int LastPickedDir = -1;
453 double LastEventPosition[3] = {};
460 VTK_ABI_NAMESPACE_END
vtkNew< vtkDoubleArray > AxesColors
abstract superclass for all actors, volumes and annotations
std::string GetXMinusLabelText()
Set/Get the '-' axis label text.
void SetXPlusLabelText(const std::string &label)
Set/Get the '+' axis label text.
represents an object (geometry & properties) in a rendered scene
std::string GetYMinusLabelText()
Set/Get the '-' axis label text.
pick an actor/prop using graphics hardware
abstract specification for Viewports
represent surface properties of a geometric object
void SetYPlusLabelText(const std::string &label)
Set/Get the '+' axis label text.
vtkNew< vtkTubeFilter > ShaftGlyphs
std::string GetZPlusLabelText()
Set/Get the '+' axis label text.
void SetYMinusLabelText(const std::string &label)
Set/Get the '-' axis label text.
vtkNew< vtkDiskSource > ContainerSource
vtkNew< vtkActor > Shafts
concrete dataset represents vertices, lines, polygons, and triangle strips
void AnchorToLowerLeft()
Get/Set the widget anchor type.
vtkNew< vtkActor > Container
dynamic, self-adjusting array of double
window superclass for vtkRenderWindow
void SetZMinusLabelText(const std::string &label)
Set/Get the '-' axis label text.
std::string GetZMinusLabelText()
Set/Get the '-' axis label text.
filter that generates tubes around lines
vtkNew< vtkPoints > Points
a simple class to control print indentation
vtkNew< vtkPropPicker > HandlePicker
topologically and geometrically regular array of data
handles properties associated with a texture map
virtual void Modified()
Update the modification time for this object.
#define VTK_SIZEHINT(...)
represent text properties.
std::string GetYPlusLabelText()
Set/Get the '+' axis label text.
void AnchorToUpperRight()
Get/Set the widget anchor type.
vtkNew< vtkPolyData > Skeleton
InteractionStateType GetInteractionStateAsEnum() noexcept
Convenient method to get InteractionState as enum.
create a disk with hole in center
vtkNew< vtkTransform > Transform
void SetXMinusLabelText(const std::string &label)
Set/Get the '-' axis label text.
void SetZPlusLabelText(const std::string &label)
Set/Get the '+' axis label text.
std::string GetXPlusLabelText()
Set/Get the '+' axis label text.
A 3D representation for vtkCameraOrientationWidget.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
represent and manipulate 3D points
void AnchorToLowerRight()
Get/Set the widget anchor type.
void AnchorToUpperLeft()
Get/Set the widget anchor type.