VTK
dox/Rendering/vtkSelectVisiblePoints.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkSelectVisiblePoints.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 =========================================================================*/
00050 #ifndef __vtkSelectVisiblePoints_h
00051 #define __vtkSelectVisiblePoints_h
00052 
00053 #include "vtkPolyDataAlgorithm.h"
00054 
00055 class vtkRenderer;
00056 class vtkMatrix4x4;
00057 
00058 class VTK_RENDERING_EXPORT vtkSelectVisiblePoints : public vtkPolyDataAlgorithm
00059 {
00060 public:
00061   vtkTypeMacro(vtkSelectVisiblePoints,vtkPolyDataAlgorithm);
00062   void PrintSelf(ostream& os, vtkIndent indent);
00063 
00066   static vtkSelectVisiblePoints *New();
00067 
00069 
00071   void SetRenderer(vtkRenderer* ren)
00072     {
00073       if (this->Renderer != ren)
00074         {
00075         this->Renderer = ren;
00076         this->Modified();
00077         }
00078     }
00079   vtkRenderer* GetRenderer() { return this->Renderer; }
00081 
00083 
00085   vtkSetMacro(SelectionWindow,int);
00086   vtkGetMacro(SelectionWindow,int);
00087   vtkBooleanMacro(SelectionWindow,int);
00089 
00091 
00093   vtkSetVector4Macro(Selection,int);
00094   vtkGetVectorMacro(Selection,int,4);
00096 
00098 
00100   vtkSetMacro(SelectInvisible,int);
00101   vtkGetMacro(SelectInvisible,int);
00102   vtkBooleanMacro(SelectInvisible,int);
00104 
00106 
00109   vtkSetClampMacro(Tolerance,double,0.0,VTK_DOUBLE_MAX);
00110   vtkGetMacro(Tolerance,double);
00112 
00116   float * Initialize(bool getZbuff);
00117 
00120   bool IsPointOccluded(const double x[3], const float *zPtr);
00121 
00123   unsigned long GetMTime();
00124 
00125 protected:
00126   vtkSelectVisiblePoints();
00127   ~vtkSelectVisiblePoints();
00128 
00129   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00130   virtual int FillInputPortInformation(int port, vtkInformation *info);
00131 
00132   vtkRenderer *Renderer;
00133   vtkMatrix4x4 *CompositePerspectiveTransform;
00134 
00135   int SelectionWindow;
00136   int Selection[4];
00137   int InternalSelection[4];
00138   int SelectInvisible;
00139   double Tolerance;
00140 
00141 private:
00142   vtkSelectVisiblePoints(const vtkSelectVisiblePoints&);  // Not implemented.
00143   void operator=(const vtkSelectVisiblePoints&);  // Not implemented.
00144 };
00145 
00146 #endif