• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Widgets/vtkPointHandleRepresentation2D.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPointHandleRepresentation2D.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00029 #ifndef __vtkPointHandleRepresentation2D_h
00030 #define __vtkPointHandleRepresentation2D_h
00031 
00032 #include "vtkHandleRepresentation.h"
00033 
00034 class vtkProperty2D;
00035 class vtkActor2D;
00036 class vtkPolyDataMapper2D;
00037 class vtkPolyData;
00038 class vtkGlyph2D;
00039 class vtkPoints;
00040 class vtkPolyDataAlgorithm;
00041 class vtkPointPlacer;
00042 
00043 class VTK_WIDGETS_EXPORT vtkPointHandleRepresentation2D : public vtkHandleRepresentation
00044 {
00045 public:
00047   static vtkPointHandleRepresentation2D *New();
00048 
00050 
00051   vtkTypeRevisionMacro(vtkPointHandleRepresentation2D,vtkHandleRepresentation);
00052   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00056 
00059   void SetCursorShape(vtkPolyData *cursorShape);
00060   vtkPolyData *GetCursorShape();
00062 
00066   virtual void SetDisplayPosition(double xyz[3]);
00067 
00069 
00070   void SetProperty(vtkProperty2D*);
00071   void SetSelectedProperty(vtkProperty2D*);
00072   vtkGetObjectMacro(Property,vtkProperty2D);
00073   vtkGetObjectMacro(SelectedProperty,vtkProperty2D);
00075   
00077 
00080   virtual double *GetBounds();
00081   virtual void BuildRepresentation();
00082   virtual void StartWidgetInteraction(double eventPos[2]);
00083   virtual void WidgetInteraction(double eventPos[2]);
00084   virtual int ComputeInteractionState(int X, int Y, int modify=0);
00086 
00088 
00089   virtual void ShallowCopy(vtkProp *prop);
00090   virtual void GetActors2D(vtkPropCollection *);
00091   virtual void ReleaseGraphicsResources(vtkWindow *);
00092   virtual int RenderOverlay(vtkViewport *viewport);
00094   
00095 protected:
00096   vtkPointHandleRepresentation2D();
00097   ~vtkPointHandleRepresentation2D();
00098 
00099   // Render the cursor
00100   vtkActor2D           *Actor;
00101   vtkPolyDataMapper2D  *Mapper;
00102   vtkGlyph2D           *Glypher;
00103   vtkPolyData          *CursorShape;
00104   vtkPolyData          *FocalData;
00105   vtkPoints            *FocalPoint;
00106 
00107   // Support picking
00108   double LastPickPosition[3];
00109   double LastEventPosition[2];
00110   
00111   // Methods to manipulate the cursor
00112   int  ConstraintAxis;
00113   void Translate(double eventPos[2]);
00114   void Scale(double eventPos[2]);
00115   void Highlight(int highlight);
00116 
00122   virtual void SetPointPlacer( vtkPointPlacer * ); 
00123 
00124   // Properties used to control the appearance of selected objects and
00125   // the manipulator in general.
00126   vtkProperty2D *Property;
00127   vtkProperty2D *SelectedProperty;
00128   void           CreateDefaultProperties();
00129   
00130   // The size of the hot spot.
00131   int    DetermineConstraintAxis(int constraint, double eventPos[2]);
00132   int    WaitingForMotion;
00133   int    WaitCount;
00134   
00135 private:
00136   vtkPointHandleRepresentation2D(const vtkPointHandleRepresentation2D&);  //Not implemented
00137   void operator=(const vtkPointHandleRepresentation2D&);  //Not implemented
00138 };
00139 
00140 #endif

Generated by  doxygen 1.7.1