Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends

vtkKWEPaintbrushRepresentation Class Reference

An abstract base class for 2D/3D paintbrush widget representations. More...

#include <vtkKWEPaintbrushRepresentation.h>

Inheritance diagram for vtkKWEPaintbrushRepresentation:
Inheritance graph
[legend]
Collaboration diagram for vtkKWEPaintbrushRepresentation:
Collaboration graph
[legend]

List of all members.

Public Types

enum  {
  PaintbrushInteract, PaintbrushDraw, PaintbrushErase, PaintbrushResize,
  PaintbrushIsotropicResize, PaintbrushDisabled
}

Public Member Functions

virtual int BeginNewSketch ()
int GetSketchIndex ()
virtual int BeginNewStroke ()
virtual int RemoveSketch (vtkKWEPaintbrushSketch *s)
void SetShapePlacer (vtkPointPlacer *)
virtual vtkPointPlacerGetShapePlacer ()
virtual int ResizeShape (double d[3], int resizeType)=0
virtual double * GetCurrentShapePosition ()
virtual void GetCurrentShapePosition (double &, double &, double &)
virtual void GetCurrentShapePosition (double[3])
virtual void DeepCopy (vtkWidgetRepresentation *)
virtual int IsInsideCanvas (int displayPos[2])
virtual void AddShapeToCurrentStroke (double p[3])
virtual int ActivateShapeOutline (int X, int Y)=0
virtual void CreateShapeOutline (double *pos)=0

 vtkTypeRevisionMacro (vtkKWEPaintbrushRepresentation, vtkWidgetRepresentation)
void PrintSelf (ostream &os, vtkIndent indent)

virtual void BuildRepresentation ()=0
virtual int ComputeInteractionState (int X, int Y, int modified=0)=0
virtual void StartWidgetInteraction (double e[2])=0
virtual void WidgetInteraction (double e[2])=0

virtual void SetPaintbrushDrawing (vtkKWEPaintbrushDrawing *)
virtual vtkKWEPaintbrushDrawingGetPaintbrushDrawing ()

virtual void SetPaintbrushOperation (vtkKWEPaintbrushOperation *)
virtual vtkKWEPaintbrushOperationGetPaintbrushOperation ()

virtual void SetStateToDraw ()
virtual void SetStateToErase ()
virtual void SetStateToInteract ()
virtual void SetStateToResize ()
virtual void SetStateToDisabled ()
virtual void SetStateToIsotropicResize ()

virtual int GoToSketch (int n)
virtual int IncrementSketch ()
virtual int DecrementSketch ()

virtual int UndoStroke ()
virtual int RemoveLastStroke ()
virtual int RedoStroke ()

virtual
vtkKWEPaintbrushAnnotationRepresentation
GetAnnotation ()

virtual
vtkKWEPaintbrushSelectionRepresentation
GetSelectionRepresentation ()

virtual void SetShapeOutlineVisibility (int)=0
virtual int GetShapeOutlineVisibility ()=0

virtual int IncreaseOpacity ()
virtual int DecreaseOpacity ()

virtual void InstallPipeline ()
virtual void UnInstallPipeline ()

Protected Member Functions

 vtkKWEPaintbrushRepresentation ()
 ~vtkKWEPaintbrushRepresentation ()
virtual void GetEtchExtents (int extent[6])

Protected Attributes

vtkKWEPaintbrushOperationPaintbrushOperation
vtkKWEPaintbrushDrawingPaintbrushDrawing
vtkPointPlacerShapePlacer
vtkKWEPaintbrushAnnotationRepresentationAnnotation
vtkKWEPaintbrushSelectionRepresentationSelectionRepresentation

int LastDisplayPosition [2]
double CurrentShapePosition [3]
int SketchIndex
int ShapeOutlineVisibility
int PipelineInstalled

Friends

class vtkKWEPaintbrushAnnotationRepresentation

Detailed Description

An abstract base class for 2D/3D paintbrush widget representations.

See vtkKWEPaintbrushRepresentation2D for more details. The ShapePlacer must be set prior to use.

Definition at line 45 of file vtkKWEPaintbrushRepresentation.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
PaintbrushInteract 
PaintbrushDraw 
PaintbrushErase 
PaintbrushResize 
PaintbrushIsotropicResize 
PaintbrushDisabled 

Definition at line 58 of file vtkKWEPaintbrushRepresentation.h.


Constructor & Destructor Documentation

vtkKWEPaintbrushRepresentation::vtkKWEPaintbrushRepresentation (  )  [protected]
vtkKWEPaintbrushRepresentation::~vtkKWEPaintbrushRepresentation (  )  [protected]

Member Function Documentation

vtkKWEPaintbrushRepresentation::vtkTypeRevisionMacro ( vtkKWEPaintbrushRepresentation  ,
vtkWidgetRepresentation   
)

Standard VTK methods.

void vtkKWEPaintbrushRepresentation::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

Reimplemented in vtkKWEPaintbrushRepresentation2D, and vtkKWEPaintbrushRepresentationGrayscale2D.

virtual void vtkKWEPaintbrushRepresentation::BuildRepresentation (  )  [pure virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

Implements vtkWidgetRepresentation.

Implemented in vtkKWEPaintbrushRepresentation2D, and vtkKWEPaintbrushRepresentationGrayscale2D.

virtual int vtkKWEPaintbrushRepresentation::ComputeInteractionState ( int  X,
int  Y,
int  modified = 0 
) [pure virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

Reimplemented from vtkWidgetRepresentation.

Implemented in vtkKWEPaintbrushRepresentation2D.

virtual void vtkKWEPaintbrushRepresentation::StartWidgetInteraction ( double  e[2]  )  [pure virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

Reimplemented from vtkWidgetRepresentation.

Implemented in vtkKWEPaintbrushRepresentation2D.

virtual void vtkKWEPaintbrushRepresentation::WidgetInteraction ( double  e[2]  )  [pure virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

Reimplemented from vtkWidgetRepresentation.

Implemented in vtkKWEPaintbrushRepresentation2D.

virtual void vtkKWEPaintbrushRepresentation::SetPaintbrushDrawing ( vtkKWEPaintbrushDrawing  )  [virtual]

Set the Paintbrush sequencer

Reimplemented in vtkKWEPaintbrushRepresentation2D, and vtkKWEPaintbrushRepresentationGrayscale2D.

virtual vtkKWEPaintbrushDrawing* vtkKWEPaintbrushRepresentation::GetPaintbrushDrawing (  )  [virtual]

Set the Paintbrush sequencer

virtual void vtkKWEPaintbrushRepresentation::SetPaintbrushOperation ( vtkKWEPaintbrushOperation  )  [virtual]

Set the paintbrush operation.

Reimplemented in vtkKWEPaintbrushRepresentation2D.

virtual vtkKWEPaintbrushOperation* vtkKWEPaintbrushRepresentation::GetPaintbrushOperation (  )  [virtual]

Set the paintbrush operation.

virtual void vtkKWEPaintbrushRepresentation::SetStateToDraw (  )  [inline, virtual]

Set the Paintbrush representation state

Reimplemented in vtkKWEPaintbrushRepresentation2D.

Definition at line 91 of file vtkKWEPaintbrushRepresentation.h.

virtual void vtkKWEPaintbrushRepresentation::SetStateToErase (  )  [inline, virtual]

Set the Paintbrush representation state

Reimplemented in vtkKWEPaintbrushRepresentation2D.

Definition at line 92 of file vtkKWEPaintbrushRepresentation.h.

virtual void vtkKWEPaintbrushRepresentation::SetStateToInteract (  )  [inline, virtual]

Set the Paintbrush representation state

Reimplemented in vtkKWEPaintbrushRepresentation2D.

Definition at line 93 of file vtkKWEPaintbrushRepresentation.h.

virtual void vtkKWEPaintbrushRepresentation::SetStateToResize (  )  [inline, virtual]

Set the Paintbrush representation state

Definition at line 94 of file vtkKWEPaintbrushRepresentation.h.

virtual void vtkKWEPaintbrushRepresentation::SetStateToDisabled (  )  [inline, virtual]

Set the Paintbrush representation state

Reimplemented in vtkKWEPaintbrushRepresentation2D.

Definition at line 95 of file vtkKWEPaintbrushRepresentation.h.

virtual void vtkKWEPaintbrushRepresentation::SetStateToIsotropicResize (  )  [inline, virtual]

Set the Paintbrush representation state

Definition at line 96 of file vtkKWEPaintbrushRepresentation.h.

virtual int vtkKWEPaintbrushRepresentation::BeginNewSketch (  )  [virtual]

Start a new sketch.

virtual int vtkKWEPaintbrushRepresentation::GoToSketch ( int  n  )  [virtual]

Methods to jump to a certain sketch. Returns 0 if the jump was unsuccessful, (if you try to jump outside the available sketches etc).

virtual int vtkKWEPaintbrushRepresentation::IncrementSketch (  )  [virtual]

Methods to jump to a certain sketch. Returns 0 if the jump was unsuccessful, (if you try to jump outside the available sketches etc).

virtual int vtkKWEPaintbrushRepresentation::DecrementSketch (  )  [virtual]

Methods to jump to a certain sketch. Returns 0 if the jump was unsuccessful, (if you try to jump outside the available sketches etc).

int vtkKWEPaintbrushRepresentation::GetSketchIndex (  ) 

Get the sketch being currently edited.

virtual int vtkKWEPaintbrushRepresentation::BeginNewStroke (  )  [virtual]

Start a new stroke.

virtual int vtkKWEPaintbrushRepresentation::UndoStroke (  )  [virtual]

Remove the last stroke. Will work only if there is a stroke in the list

virtual int vtkKWEPaintbrushRepresentation::RemoveLastStroke (  )  [virtual]

Remove the last stroke. Will work only if there is a stroke in the list

virtual int vtkKWEPaintbrushRepresentation::RedoStroke (  )  [virtual]

Remove the last stroke. Will work only if there is a stroke in the list

virtual int vtkKWEPaintbrushRepresentation::RemoveSketch ( vtkKWEPaintbrushSketch s  )  [virtual]

Remove an entire sketch from the drawing. Returns 1 if successful. Note that this may cause the SketchIndex to decrement, if the index of the currently active sketch is higher than the one being deleted. You can query this value by calling GetSketchIndex().

void vtkKWEPaintbrushRepresentation::SetShapePlacer ( vtkPointPlacer  ) 
virtual vtkPointPlacer* vtkKWEPaintbrushRepresentation::GetShapePlacer (  )  [virtual]
virtual int vtkKWEPaintbrushRepresentation::ResizeShape ( double  d[3],
int  resizeType 
) [pure virtual]
virtual double* vtkKWEPaintbrushRepresentation::GetCurrentShapePosition (  )  [virtual]
virtual void vtkKWEPaintbrushRepresentation::GetCurrentShapePosition ( double &  ,
double &  ,
double &   
) [virtual]
virtual void vtkKWEPaintbrushRepresentation::GetCurrentShapePosition ( double  [3]  )  [virtual]
virtual void vtkKWEPaintbrushRepresentation::DeepCopy ( vtkWidgetRepresentation  )  [virtual]
virtual int vtkKWEPaintbrushRepresentation::IsInsideCanvas ( int  displayPos[2]  )  [virtual]

Check if display point (x,y) is inside the paintable region of the canvas. The ShapePlacer can be used to dictate which location in the canvas the shape can etch on. You can very easily restrict drawing to certain region simply by writing an appropriate point placer. (See vtkPointPlacer)

virtual vtkKWEPaintbrushAnnotationRepresentation* vtkKWEPaintbrushRepresentation::GetAnnotation (  )  [virtual]

Get the annotation representation. This displays timer based informative annotations

virtual vtkKWEPaintbrushSelectionRepresentation* vtkKWEPaintbrushRepresentation::GetSelectionRepresentation (  )  [virtual]

Get the selection widget's representation. This is used if the paintbrush is in selection mode.

virtual void vtkKWEPaintbrushRepresentation::AddShapeToCurrentStroke ( double  p[3]  )  [virtual]

INTERNAL - Do not use. Add a shape centered at "p" to the currently active sketch's current stroke. This method is called by the widget whenever we interactively trace.

Reimplemented in vtkKWEPaintbrushRepresentation2D.

virtual int vtkKWEPaintbrushRepresentation::ActivateShapeOutline ( int  X,
int  Y 
) [pure virtual]

INTERNAL - Do not use Invoked by the widget in response to user interaction Activate the template outline and the supplied coordinate according to the constraints of the placer ?

Implemented in vtkKWEPaintbrushRepresentation2D.

virtual void vtkKWEPaintbrushRepresentation::CreateShapeOutline ( double *  pos  )  [pure virtual]

INTERNAL - Do not use Invoked by the widget in response to user interaction Create a shape outline at the current shape position. Does not check the placer for constraints.

Implemented in vtkKWEPaintbrushRepresentation2D.

virtual void vtkKWEPaintbrushRepresentation::SetShapeOutlineVisibility ( int   )  [pure virtual]

INTERNAL - Do not use. Invoked by the widget in response to user interaction Turn on/off the hovering shape outline visibility

Implemented in vtkKWEPaintbrushRepresentation2D.

virtual int vtkKWEPaintbrushRepresentation::GetShapeOutlineVisibility (  )  [pure virtual]

INTERNAL - Do not use. Invoked by the widget in response to user interaction Turn on/off the hovering shape outline visibility

Implemented in vtkKWEPaintbrushRepresentation2D.

virtual int vtkKWEPaintbrushRepresentation::IncreaseOpacity (  )  [inline, virtual]

INTERNAL - Do not use. Invoked by the widget in response to user interaction Increase / Decrease the opacity of the drawing.

Reimplemented in vtkKWEPaintbrushRepresentation2D.

Definition at line 204 of file vtkKWEPaintbrushRepresentation.h.

virtual int vtkKWEPaintbrushRepresentation::DecreaseOpacity (  )  [inline, virtual]

INTERNAL - Do not use. Invoked by the widget in response to user interaction Increase / Decrease the opacity of the drawing.

Reimplemented in vtkKWEPaintbrushRepresentation2D.

Definition at line 205 of file vtkKWEPaintbrushRepresentation.h.

virtual void vtkKWEPaintbrushRepresentation::InstallPipeline (  )  [virtual]

INTERNAL - Do not use.

Reimplemented in vtkKWEPaintbrushRepresentation2D, and vtkKWEPaintbrushRepresentationGrayscale2D.

virtual void vtkKWEPaintbrushRepresentation::UnInstallPipeline (  )  [virtual]

INTERNAL - Do not use.

Reimplemented in vtkKWEPaintbrushRepresentation2D, and vtkKWEPaintbrushRepresentationGrayscale2D.

virtual void vtkKWEPaintbrushRepresentation::GetEtchExtents ( int  extent[6]  )  [protected, virtual]

Get the extents of the current etch.

Reimplemented in vtkKWEPaintbrushRepresentation2D.


Friends And Related Function Documentation

Definition at line 48 of file vtkKWEPaintbrushRepresentation.h.


Member Data Documentation

Definition at line 218 of file vtkKWEPaintbrushRepresentation.h.

Definition at line 219 of file vtkKWEPaintbrushRepresentation.h.

The point placer determines the world coordinate based on screen coordinate and allows you to set constraints too.. It can also be used to toggle the template visibility depending on the position if you write an appropriate subclass of the point placer. One such subclass snaps the contour to regular positions on the image grid.

Definition at line 226 of file vtkKWEPaintbrushRepresentation.h.

Displays timer based informative annotations

Definition at line 229 of file vtkKWEPaintbrushRepresentation.h.

The selection widget's representation. This is used if the paintbrush is in selection mode.

Definition at line 233 of file vtkKWEPaintbrushRepresentation.h.

Bookkeeping of the last display position.

Definition at line 237 of file vtkKWEPaintbrushRepresentation.h.

Bookkeeping of the last display position.

Definition at line 238 of file vtkKWEPaintbrushRepresentation.h.

Bookkeeping of the last display position.

Definition at line 239 of file vtkKWEPaintbrushRepresentation.h.

Bookkeeping of the last display position.

Definition at line 240 of file vtkKWEPaintbrushRepresentation.h.

Bookkeeping of the last display position.

Definition at line 241 of file vtkKWEPaintbrushRepresentation.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines