30 #ifndef vtkControlPointsItem_h
31 #define vtkControlPointsItem_h
56 CurrentPointChangedEvent = vtkCommand::UserEvent,
97 void SelectPoint(
double* currentPoint);
100 void SelectAllPoints();
108 void DeselectPoint(
double* currentPoint);
111 void DeselectAllPoints();
115 void ToggleSelectPoint(
vtkIdType pointId);
120 void ToggleSelectPoint(
double* currentPoint);
126 vtkIdType GetNumberOfSelectedPoints()
const;
135 bool IsOverPoint(
double* pos,
vtkIdType pointId);
139 vtkIdType GetControlPointId(
double* pos);
146 bool excludeFirstAndLast =
false)
const;
171 virtual bool GetEndPointsMovable();
197 virtual vtkIdType AddPoint(
double* newPos) = 0;
202 virtual vtkIdType RemovePoint(
double* pos) = 0;
209 inline void RemoveCurrentPoint();
212 virtual vtkIdType GetNumberOfPoints()
const = 0;
247 void SpreadPoints(
float factor,
bool dontSpreadFirstAndLast =
false);
289 void StartInteraction();
290 void StartInteractionIfNotStarted();
292 void EndInteraction();
293 int GetInteractionsCount()
const;
294 virtual void emitEvent(
unsigned long event,
void*
params = 0) = 0;
296 static void CallComputePoints(
vtkObject* sender,
unsigned long event,
void* receiver,
void*
params);
301 virtual void ComputePoints();
302 virtual unsigned long int GetControlPointsMTime() =0;
318 virtual bool ClampPos(
double pos[2],
double bounds[4]);
319 bool ClampValidPos(
double pos[2]);
330 void SetCurrentPointPos(
const vtkVector2f& newPos);
335 inline vtkVector2f GetSelectionCenterOfMass()
const;
350 bool IsEndPointPicked();
353 bool IsPointRemovable(
vtkIdType pointId);
360 virtual void ComputeBounds(
double* bounds);
376 double UserBounds[4];
377 double ValidBounds[4];
400 void ComputeBounds();
Wrapper around std::string to keep symbols short.
data structure to represent key events.
GLenum const GLfloat * params
abstract base class for most VTK objects
vtkIdType GetCurrentPoint() const
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
virtual bool Paint(vtkContext2D *painter)
bool PointAboutToBeToggled
virtual bool KeyReleaseEvent(const vtkContextKeyEvent &key)
#define vtkGetMacro(name, type)
vtkVector2f GetSelectionCenterOfMass() const
Abstract class for control points items.
virtual void GetBounds(double bounds[4])
dynamic, self-adjusting array of vtkIdType
#define vtkSetStringMacro(name)
vtkPen * SelectedPointPen
#define vtkTypeMacro(thisClass, superclass)
virtual bool UsingLogScale()
vtkVector2f GetCenterOfMass(vtkIdTypeArray *pointIDs) const
vtkIdTypeArray * Selection
void RemoveCurrentPoint()
vtkBrush * SelectedPointBrush
Class for drawing 2D primitives to a graphical context.
supports function callbacks
provides a brush that fills shapes drawn by vtkContext2D.
data structure to represent mouse events.
virtual bool SelectPoints(const vtkVector2f &min, const vtkVector2f &max)
vtkTransform2D * Transform
#define vtkSetVector4Macro(name, type)
a simple class to control print indentation
represent and manipulate 2D points
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
#define vtkGetVector4Macro(name, type)
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Abstract class for 2D plots.
#define vtkGetStringMacro(name)
#define vtkGetObjectMacro(name, type)
virtual bool KeyPressEvent(const vtkContextKeyEvent &key)
virtual vtkIdType RemovePoint(double *pos)=0
virtual void PrintSelf(ostream &os, vtkIndent indent)
bool EnforceValidFunction
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
bool PointAboutToBeDeleted
virtual bool Hit(const vtkContextMouseEvent &mouse)
virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse)
vtkCallbackCommand * Callback
#define VTKCHARTSCORE_EXPORT
#define vtkSetMacro(name, type)