18#ifndef vtkCurveRepresentation_h 
   19#define vtkCurveRepresentation_h 
   21#include "vtkInteractionWidgetsModule.h"  
   25VTK_ABI_NAMESPACE_BEGIN
 
   37#define VTK_PROJECTION_YZ 0 
   38#define VTK_PROJECTION_XZ 1 
   39#define VTK_PROJECTION_XY 2 
   40#define VTK_PROJECTION_OBLIQUE 3 
   65  vtkSetMacro(InteractionState, 
int);
 
   90  vtkGetMacro(ProjectionNormal, 
int);
 
  105  vtkGetMacro(ProjectionPosition, 
double);
 
  140  vtkGetMacro(NumberOfHandles, 
int);
 
  150  vtkGetMacro(Directional, 
bool);
 
  151  vtkBooleanMacro(Directional, 
bool);
 
  252  vtkGetMacro(CurrentHandleIndex, 
int);
 
  260  vtkGetMacro(TranslationAxis, 
int);
 
  261  vtkSetClampMacro(TranslationAxis, 
int, -1, 2);
 
  294  double LastEventPosition[3];
 
  308  int NumberOfHandles = 0;
 
  337  double LastPickPosition[3];
 
  344  void Scale(
double* p1, 
double* p2, 
int X, 
int Y);
 
  346  void Spin(
double* p1, 
double* p2, 
double* vpn);
 
  352  bool Directional = 
false;
 
represents an object (geometry & properties) in a rendered scene
 
ray-cast cell picker for all kinds of Prop3Ds
 
base class for a widget that represents a curve that connects control points.
 
void ProjectPointsToOrthoPlane()
 
vtkProperty * HandleProperty
 
void SetForegroundColor(double, double, double)
Set the color when unselected and selected.
 
virtual void PushHandle(double *pos)
 
void Translate(double *p1, double *p2)
 
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Methods supporting, and required by, the rendering process.
 
void SetProjectionPosition(double position)
Set the position of poly line handles and points in terms of a plane's position.
 
virtual vtkDoubleArray * GetHandlePositions()=0
Set/Get the position of the handles.
 
void ProjectPointsToPlane()
 
virtual int InsertHandleOnLine(double *pos)=0
Returns the position of insertion or -1 on fail.
 
void RegisterPickers() override
Register internal Pickers in the Picking Manager.
 
virtual double GetSummedLength()=0
Get the approximate vs.
 
vtkCellPicker * LinePicker
 
void SetInteractionColor(double c[3])
Set the color when unselected and selected.
 
vtkCellPicker * HandlePicker
 
void SetTranslationAxisOff()
Toggles constraint translation axis on/off.
 
virtual vtkActor * GetHandleActor(int index)=0
 
double * GetBounds() override
These are methods that satisfy vtkWidgetRepresentation API.
 
void Scale(double *p1, double *p2, int X, int Y)
 
~vtkCurveRepresentation() override
 
void SetProjectionNormalToZAxes()
 
vtkTypeBool HasTranslucentPolygonalGeometry() override
Methods supporting, and required by, the rendering process.
 
void WidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation API.
 
void EndWidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation API.
 
void SetZTranslationAxisOn()
Toggles constraint translation axis on/off.
 
void SetForegroundColor(double c[3])
Set the color when unselected and selected.
 
virtual vtkHandleSource * GetHandleSource(int index)=0
 
vtkTypeBool IsClosed()
Convenience method to determine whether the curve is closed in a geometric sense.
 
void Spin(double *p1, double *p2, double *vpn)
 
void SetClosed(vtkTypeBool closed)
Control whether the curve is open or closed.
 
virtual void SetNumberOfHandles(int npts)=0
Set/Get the number of handles for this widget.
 
void SetInteractionColor(double, double, double)
Set the color when unselected and selected.
 
void SetLineColor(double r, double g, double b)
Convenience method to set the line color.
 
void ProjectPointsToObliquePlane()
 
void ReleaseGraphicsResources(vtkWindow *) override
Methods supporting, and required by, the rendering process.
 
int RenderOverlay(vtkViewport *) override
Methods supporting, and required by, the rendering process.
 
int HighlightHandle(vtkProp *prop)
 
virtual double * GetHandlePosition(int handle)
Set/Get the position of the handles.
 
void BuildRepresentation() override=0
These are methods that satisfy vtkWidgetRepresentation API.
 
int ComputeInteractionState(int X, int Y, int modify=0) override
These are methods that satisfy vtkWidgetRepresentation API.
 
void SetProjectionNormalToXAxes()
 
void CreateDefaultProperties()
 
int RenderOpaqueGeometry(vtkViewport *) override
Methods supporting, and required by, the rendering process.
 
void SetPlaneSource(vtkPlaneSource *plane)
Set up a reference to a vtkPlaneSource that could be from another widget object, e....
 
virtual void InitializeHandles(vtkPoints *points)=0
Convenience method to allocate and set the handles from a vtkPoints instance.
 
void SetYTranslationAxisOn()
Toggles constraint translation axis on/off.
 
void HighlightLine(int highlight)
 
virtual void SetDirectional(bool val)
Set the representation to be directional or not.
 
void SetXTranslationAxisOn()
Toggles constraint translation axis on/off.
 
void SetProjectionNormalToYAxes()
 
virtual void SetHandlePosition(int handle, double x, double y, double z)
Set/Get the position of the handles.
 
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.
 
void StartWidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation API.
 
bool IsTranslationConstrained()
Returns true if ConstrainedAxis.
 
void GetActors(vtkPropCollection *) override
Methods to make this class behave as a vtkProp.
 
virtual void GetHandlePosition(int handle, double xyz[3])
Set/Get the position of the handles.
 
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 void SetHandlePosition(int handle, double xyz[3])
Set/Get the position of the handles.
 
virtual int GetHandleIndex(vtkProp *prop)=0
returns handle index or -1 on fail
 
vtkProperty * SelectedHandleProperty
 
void SetCurrentHandleIndex(int index)
Get/Set the current handle index.
 
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