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);
118 void SetProjectionPosition(
double position);
119 vtkGetMacro(ProjectionPosition,
double);
137 vtkGetObjectMacro(SelectedHandleProperty,
vtkProperty);
146 vtkGetObjectMacro(SelectedLineProperty,
vtkProperty);
153 virtual void SetNumberOfHandles(
int npts) = 0;
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);
202 vtkBooleanMacro(Closed, vtkTypeBool);
210 vtkTypeBool IsClosed();
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;
245 void ReleaseGraphicsResources(
vtkWindow*) override;
247 int RenderTranslucentPolygonalGeometry(
vtkViewport*) override;
249 vtkTypeBool HasTranslucentPolygonalGeometry() 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];
322 void ProjectPointsToPlane();
323 void ProjectPointsToOrthoPlane();
324 void ProjectPointsToObliquePlane();
326 int NumberOfHandles = 0;
331 void HighlightLine(
int highlight);
332 int HighlightHandle(
vtkProp* prop);
341 virtual int GetHandleIndex(
vtkProp* prop) = 0;
342 virtual void SizeHandles();
347 virtual int InsertHandleOnLine(
double* pos) = 0;
349 virtual void PushHandle(
double* pos);
350 virtual void EraseHandle(
const int&);
355 double LastPickPosition[3];
361 void MovePoint(
double* p1,
double* p2);
362 void Scale(
double* p1,
double* p2,
int X,
int Y);
363 void Translate(
double* p1,
double* p2);
364 void Spin(
double* p1,
double* p2,
double* vpn);
370 bool Directional =
false;
378 void CreateDefaultProperties();
382 void CalculateCentroid();
vtkCellPicker * LinePicker
abstract superclass for all actors, volumes and annotations
vtkWidgetRepresentation base class for a widget that represents an curve that connects control points...
void SetTranslationAxisOff()
Toggles constraint translation axis on/off.
void SetProjectionNormalToZAxes()
#define VTK_DEPRECATED_IN_9_1_0(reason)
void GetBounds(T a, double bds[6])
represents an object (geometry & properties) in a rendered scene
double ProjectionPosition
vtkProperty * HandleProperty
abstract specification for Viewports
represent surface properties of a geometric object
#define VTK_DEPRECATED_IN_9_2_0(reason)
interface that can be inherited to define handler sources for any kind of interaction.
void SetZTranslationAxisOn()
Toggles constraint translation axis on/off.
vtkProperty * SelectedLineProperty
concrete dataset represents vertices, lines, polygons, and triangle strips
vtkProperty * SelectedHandleProperty
dynamic, self-adjusting array of double
void SetProjectionNormalToYAxes()
vtkTypeBool ProjectToPlane
vtkCellPicker * HandlePicker
vtkPlaneSource * PlaneSource
window superclass for vtkRenderWindow
void SetYTranslationAxisOn()
Toggles constraint translation axis on/off.
a simple class to control print indentation
vtkProperty * LineProperty
void SetProjectionNormalToOblique()
create an array of quadrilaterals located in a plane
void SetProjectionNormalToXAxes()
bool IsTranslationConstrained()
Returns true if ContrainedAxis.
#define VTK_PROJECTION_OBLIQUE
ray-cast cell picker for all kinds of Prop3Ds
#define VTK_PROJECTION_YZ
represent and manipulate 3D points