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

# Rendering/vtkCellPicker.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkCellPicker.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 =========================================================================*/
    00049 #ifndef __vtkCellPicker_h
    00050 #define __vtkCellPicker_h
    00051
    00052 #include "vtkPicker.h"
    00053
    00054 class vtkGenericCell;
    00055
    00056 class VTK_RENDERING_EXPORT vtkCellPicker : public vtkPicker
    00057 {
    00058 public:
    00059   static vtkCellPicker *New();
    00060   vtkTypeRevisionMacro(vtkCellPicker,vtkPicker);
    00061   void PrintSelf(ostream& os, vtkIndent indent);
    00062
    00064
    00065   vtkGetMacro(CellId, vtkIdType);
    00067
    00069
    00070   vtkGetMacro(SubId, int);
    00072
    00074
    00076   vtkGetVectorMacro(PCoords, float,3);
    00078
    00079 protected:
    00080   vtkCellPicker();
    00081   ~vtkCellPicker();
    00082
    00083   vtkIdType CellId; // picked cell
    00084   int SubId; // picked cell subId
    00085   float PCoords[3]; // picked cell parametric coordinates
    00086
    00087   virtual float IntersectWithLine(float p1[3], float p2[3], float tol,
    00088                                   vtkAssemblyPath *path, vtkProp3D *p,
    00089                                   vtkAbstractMapper3D *m);
    00090   void Initialize();
    00091
    00092 private:
    00093   vtkGenericCell *Cell; //used to accelerate picking
    00094
    00095 private:
    00096   vtkCellPicker(const vtkCellPicker&);  // Not implemented.
    00097   void operator=(const vtkCellPicker&);  // Not implemented.
    00098 };
    00099
    00100 #endif
    00101
    00102