Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Hybrid/vtk3DWidget.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtk3DWidget.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00062 #ifndef __vtk3DWidget_h 00063 #define __vtk3DWidget_h 00064 00065 #include "vtkInteractorObserver.h" 00066 00067 class vtkDataSet; 00068 class vtkProp3D; 00069 00070 class VTK_HYBRID_EXPORT vtk3DWidget : public vtkInteractorObserver 00071 { 00072 public: 00073 vtkTypeRevisionMacro(vtk3DWidget,vtkInteractorObserver); 00074 void PrintSelf(ostream& os, vtkIndent indent); 00075 00077 00084 virtual void PlaceWidget(float bounds[6]) = 0; 00085 void PlaceWidget(); 00086 void PlaceWidget(float xmin, float xmax, float ymin, float ymax, 00087 float zmin, float zmax); 00089 00091 00094 virtual void SetProp3D(vtkProp3D*); 00095 vtkGetObjectMacro(Prop3D,vtkProp3D); 00097 00099 00102 virtual void SetInput(vtkDataSet*); 00103 vtkGetObjectMacro(Input,vtkDataSet); 00105 00107 00113 vtkSetClampMacro(PlaceFactor,float,0.01,VTK_LARGE_FLOAT); 00114 vtkGetMacro(PlaceFactor,float); 00116 00118 00122 vtkSetClampMacro(HandleSize,float,0.001,0.5); 00123 vtkGetMacro(HandleSize,float); 00125 00126 protected: 00127 vtk3DWidget(); 00128 ~vtk3DWidget(); 00129 00130 // Used to position and scale the widget initially 00131 vtkProp3D *Prop3D; 00132 vtkDataSet *Input; 00133 00134 //has the widget ever been placed 00135 float PlaceFactor; 00136 int Placed; 00137 void AdjustBounds(float bounds[6], float newBounds[6], float center[3]); 00138 00139 //control the size of handles (if there are any) 00140 float InitialBounds[6]; 00141 float InitialLength; 00142 float HandleSize; 00143 float SizeHandles(float factor); 00144 virtual void SizeHandles() {}//subclass in turn invokes parent's SizeHandles() 00145 00146 //used to track the depth of the last pick; also interacts with handle sizing 00147 int ValidPick; 00148 float LastPickPosition[3]; 00149 00150 private: 00151 vtk3DWidget(const vtk3DWidget&); // Not implemented. 00152 void operator=(const vtk3DWidget&); // Not implemented. 00153 00154 }; 00155 00156 #endif