Go to the documentation of this file.
30 #ifndef vtkControlPointsItem_h
31 #define vtkControlPointsItem_h
56 CurrentPointChangedEvent = vtkCommand::UserEvent,
146 bool excludeFirstAndLast =
false)
const;
209 inline void RemoveCurrentPoint();
318 virtual bool ClampPos(
double pos[2],
double bounds[4]);
335 inline vtkVector2f GetSelectionCenterOfMass()
const;
376 double UserBounds[4];
377 double ValidBounds[4];
400 void ComputeBounds();
provides a brush that fills shapes drawn by vtkContext2D.
represent and manipulate 2D points
bool EnforceValidFunction
vtkBrush * SelectedPointBrush
bool IsPointRemovable(vtkIdType pointId)
data structure to represent mouse events.
#define vtkGetObjectMacro(name, type)
data structure to represent key events.
vtkIdType SetPointPos(vtkIdType point, const vtkVector2f &newPos)
vtkIdType GetNumberOfSelectedPoints() const
virtual void GetControlPoint(vtkIdType index, double *point) const =0
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
virtual void GetBounds(double bounds[4])
bool PointAboutToBeToggled
virtual vtkIdType GetNumberOfPoints() const =0
vtkIdType RemovePoint(vtkIdType pointId)
virtual void ComputePoints()
void DrawSelectedPoints(vtkContext2D *painter)
virtual bool KeyPressEvent(const vtkContextKeyEvent &key)
void MoveCurrentPoint(const vtkVector2f &translation)
virtual void SetControlPoint(vtkIdType index, double *point)=0
void DeselectPoint(double *currentPoint)
bool PointAboutToBeDeleted
virtual void DrawPoint(vtkContext2D *painter, vtkIdType index)
#define vtkTypeMacro(thisClass, superclass)
virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse)
abstract base class for most VTK objects
void StartInteractionIfNotStarted()
void SpreadPoints(float factor, bool dontSpreadFirstAndLast=false)
void MovePoints(const vtkVector2f &translation, vtkIdTypeArray *pointIds)
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
Class for drawing 2D primitives to a graphical context.
void SetCurrentPointPos(const vtkVector2f &newPos)
virtual bool SelectPoints(const vtkVector2f &min, const vtkVector2f &max)
virtual vtkIdType AddPoint(double *newPos)=0
virtual bool GetEndPointsMovable()
Abstract class for 2D plots.
vtkIdType GetControlPointId(double *pos)
virtual vtkStdString GetControlPointLabel(vtkIdType index)
void ToggleSelectPoint(double *currentPoint)
virtual bool UsingLogScale()
void DrawUnselectedPoints(vtkContext2D *painter)
Abstract class for control points items.
void DeselectPoint(vtkIdType pointId)
vtkVector2f GetSelectionCenterOfMass() const
virtual void ComputeBounds(double *bounds)
virtual void EditPoint(float vtkNotUsed(tX), float vtkNotUsed(tY))
GLenum const GLfloat * params
virtual bool Paint(vtkContext2D *painter)
virtual vtkIdType RemovePoint(double *pos)=0
virtual bool Hit(const vtkContextMouseEvent &mouse)
a simple class to control print indentation
void MovePoints(const vtkVector2f &translation, bool dontMoveFirstAndLast=false)
#define vtkSetStringMacro(name)
vtkIdType MovePoint(vtkIdType point, const vtkVector2f &translation)
void ToggleSelectPoint(vtkIdType pointId)
virtual void TransformDataToScreen(const vtkVector2f &in, vtkVector2f &out)
bool ClampValidPos(double pos[2])
void SetCurrentPoint(vtkIdType index)
#define vtkGetMacro(name, type)
vtkTransform2D * Transform
vtkGetStringMacro(ExtensionsString)
void AddPointId(vtkIdType addedPointId)
vtkIdTypeArray * Selection
void SelectPoint(vtkIdType pointId)
void SpreadPoints(float factor, vtkIdTypeArray *pointIds)
virtual bool ClampPos(double pos[2], double bounds[4])
vtkVector2f GetCenterOfMass(vtkIdTypeArray *pointIDs) const
static void CallComputePoints(vtkObject *sender, unsigned long event, void *receiver, void *params)
virtual bool KeyReleaseEvent(const vtkContextKeyEvent &key)
void SelectPoint(double *currentPoint)
virtual void emitEvent(unsigned long event, void *params=0)=0
vtkSetMacro(IgnoreDriverBugs, bool)
#define vtkSetVector4Macro(name, type)
virtual unsigned long int GetControlPointsMTime()=0
virtual ~vtkControlPointsItem()
dynamic, self-adjusting array of vtkIdType
vtkPen * SelectedPointPen
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkIdType GetCurrentPoint() const
supports function callbacks
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
vtkIdType FindPoint(double *pos)
void RemoveCurrentPoint()
void Stroke(const vtkVector2f &newPos)
virtual void TransformScreenToData(const vtkVector2f &in, vtkVector2f &out)
int GetInteractionsCount() const
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Wrapper around std::string to keep symbols short.
#define VTKCHARTSCORE_EXPORT
#define vtkGetVector4Macro(name, type)
vtkCallbackCommand * Callback
void GetControlPointsIds(vtkIdTypeArray *ids, bool excludeFirstAndLast=false) const
bool IsOverPoint(double *pos, vtkIdType pointId)