VTK
dox/Interaction/Widgets/vtkFixedSizeHandleRepresentation3D.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkFixedSizeHandleRepresentation.h
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 =========================================================================*/
00035 #ifndef __vtkFixedSizeHandleRepresentation3D_h
00036 #define __vtkFixedSizeHandleRepresentation3D_h
00037 
00038 #include "vtkInteractionWidgetsModule.h" // For export macro
00039 #include "vtkPolygonalHandleRepresentation3D.h"
00040 
00041 class vtkSphereSource;
00042 
00043 class VTKINTERACTIONWIDGETS_EXPORT vtkFixedSizeHandleRepresentation3D : public vtkPolygonalHandleRepresentation3D
00044 {
00045 public:
00046 
00048   static vtkFixedSizeHandleRepresentation3D *New();
00049 
00051 
00052   vtkTypeMacro(vtkFixedSizeHandleRepresentation3D,
00053                vtkPolygonalHandleRepresentation3D);
00054   void PrintSelf(ostream& os, vtkIndent indent);
00056 
00058 
00059   vtkGetObjectMacro( SphereSource, vtkSphereSource );
00061 
00063 
00065   vtkSetMacro( HandleSizeInPixels, double );
00066   vtkGetMacro( HandleSizeInPixels, double );
00068 
00070 
00075   vtkSetMacro( HandleSizeToleranceInPixels, double );
00076   vtkGetMacro( HandleSizeToleranceInPixels, double );
00078 
00079 protected:
00080   vtkFixedSizeHandleRepresentation3D();
00081   ~vtkFixedSizeHandleRepresentation3D();
00082 
00084   virtual void BuildRepresentation();
00085 
00087   void WorldToDisplay( double w[4], double d[4] );
00088 
00090   void DisplayToWorld( double d[4], double w[4] );
00091 
00092   vtkSphereSource *                           SphereSource;
00093   double                                      HandleSizeInPixels;
00094   double                                      HandleSizeToleranceInPixels;
00095 
00096 private:
00097   vtkFixedSizeHandleRepresentation3D(const vtkFixedSizeHandleRepresentation3D&);  //Not implemented
00098   void operator=(const vtkFixedSizeHandleRepresentation3D&);  //Not implemented
00099 };
00100 
00101 #endif