28#ifndef vtkCurveRepresentation_h
29#define vtkCurveRepresentation_h
32#include "vtkInteractionWidgetsModule.h"
47#define VTK_PROJECTION_YZ 0
48#define VTK_PROJECTION_XZ 1
49#define VTK_PROJECTION_XY 2
50#define VTK_PROJECTION_OBLIQUE 3
70#if !defined(VTK_LEGACY_REMOVE)
79 vtkSetMacro(InteractionState,
int);
104 vtkGetMacro(ProjectionNormal,
int);
119 vtkGetMacro(ProjectionPosition,
double);
154 vtkGetMacro(NumberOfHandles,
int);
162 virtual
void SetDirectionalLine(
bool val);
164 virtual
bool GetDirectionalLine();
166 virtual
void DirectionalLineOn();
168 virtual
void DirectionalLineOff();
177 virtual
void SetDirectional(
bool val);
178 vtkGetMacro(Directional,
bool);
179 vtkBooleanMacro(Directional,
bool);
187 virtual
void SetHandlePosition(
int handle,
double x,
double y,
double z);
188 virtual
void SetHandlePosition(
int handle,
double xyz[3]);
189 virtual
void GetHandlePosition(
int handle,
double xyz[3]);
190 virtual
double* GetHandlePosition(
int handle);
217 virtual
double GetSummedLength() = 0;
233 void BuildRepresentation() override = 0;
234 int ComputeInteractionState(
int X,
int Y,
int modify = 0) override;
235 void StartWidgetInteraction(
double e[2]) override;
236 void WidgetInteraction(
double e[2]) override;
237 void EndWidgetInteraction(
double e[2]) override;
238 double* GetBounds() override;
256 void SetLineColor(
double r,
double g,
double b);
261 void RegisterPickers() override;
269 void SetCurrentHandleIndex(
int index);
270 vtkGetMacro(CurrentHandleIndex,
int);
278 vtkGetMacro(TranslationAxis,
int);
279 vtkSetClampMacro(TranslationAxis,
int, -1, 2);
286 void SetXTranslationAxisOn() { this->TranslationAxis =
Axis::XAxis; }
312 double LastEventPosition[3];
326 int NumberOfHandles = 0;
355 double LastPickPosition[3];
362 void Scale(
double* p1,
double* p2,
int X,
int Y);
364 void Spin(
double* p1,
double* p2,
double* vpn);
370 bool Directional =
false;
represents an object (geometry & properties) in a rendered scene
ray-cast cell picker for all kinds of Prop3Ds
vtkWidgetRepresentation base class for a widget that represents an curve that connects control points...
void ProjectPointsToOrthoPlane()
vtkProperty * HandleProperty
virtual void PushHandle(double *pos)
void Translate(double *p1, double *p2)
void SetProjectionPosition(double position)
Set the position of poly line handles and points in terms of a plane's position.
void ProjectPointsToPlane()
virtual int InsertHandleOnLine(double *pos)=0
Returns the position of insertion or -1 on fail.
vtkCellPicker * LinePicker
vtkCellPicker * HandlePicker
void SetTranslationAxisOff()
Toggles constraint translation axis on/off.
virtual vtkActor * GetHandleActor(int index)=0
void Scale(double *p1, double *p2, int X, int Y)
~vtkCurveRepresentation() override
void SetProjectionNormalToZAxes()
void SetZTranslationAxisOn()
Toggles constraint translation axis on/off.
virtual vtkHandleSource * GetHandleSource(int index)=0
void Spin(double *p1, double *p2, double *vpn)
virtual void SetNumberOfHandles(int npts)=0
Set/Get the number of handles for this widget.
void ProjectPointsToObliquePlane()
int HighlightHandle(vtkProp *prop)
void SetProjectionNormalToXAxes()
void CreateDefaultProperties()
void SetPlaneSource(vtkPlaneSource *plane)
Set up a reference to a vtkPlaneSource that could be from another widget object, e....
void SetYTranslationAxisOn()
Toggles constraint translation axis on/off.
void HighlightLine(int highlight)
void SetProjectionNormalToYAxes()
vtkPlaneSource * PlaneSource
vtkProperty * LineProperty
void SetProjectionNormalToOblique()
vtkProperty * SelectedLineProperty
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool IsTranslationConstrained()
Returns true if ContrainedAxis.
void GetActors(vtkPropCollection *) override
Methods to make this class behave as a vtkProp.
virtual void GetPolyData(vtkPolyData *pd)=0
Grab the polydata (including points) that defines the interpolating curve.
virtual void EraseHandle(const int &)
double ProjectionPosition
void MovePoint(double *p1, double *p2)
virtual void SizeHandles()
vtkTypeBool ProjectToPlane
virtual int GetHandleIndex(vtkProp *prop)=0
returns handle index or -1 on fail
vtkProperty * SelectedHandleProperty
dynamic, self-adjusting array of double
interface that can be inherited to define handler sources for any kind of interaction.
a simple class to control print indentation
create an array of quadrilaterals located in a plane
represent and manipulate 3D points
concrete dataset represents vertices, lines, polygons, and triangle strips
abstract superclass for all actors, volumes and annotations
represent surface properties of a geometric object
abstract specification for Viewports
window superclass for vtkRenderWindow
#define VTK_DEPRECATED_IN_9_1_0(reason)
#define VTK_DEPRECATED_IN_9_2_0(reason)