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

dox/Filtering/vtkBSPCuts.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkBSPCuts.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 =========================================================================*/
00015 /*----------------------------------------------------------------------------
00016  Copyright (c) Sandia Corporation
00017  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
00018 ----------------------------------------------------------------------------*/
00019 
00035 #ifndef __vtkBSPCuts_h
00036 #define __vtkBSPCuts_h
00037 
00038 #include "vtkObject.h"
00039 
00040 class vtkKdNode;
00041 
00042 class VTK_FILTERING_EXPORT vtkBSPCuts : public vtkObject
00043 {
00044 public:
00045   vtkTypeRevisionMacro(vtkBSPCuts, vtkObject);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047 
00048   static vtkBSPCuts *New();
00049 
00062   void CreateCuts(double *bounds,
00063                   int ncuts, int *dim, double *coord, 
00064                   int *lower, int *upper,
00065                   double *lowerDataCoord, double *upperDataCoord,
00066                   int *npoints);
00067 
00070   void CreateCuts(vtkKdNode *kd);
00071 
00075   vtkKdNode *GetKdNodeTree(){return this->Top;}
00076 
00080   vtkGetMacro(NumberOfCuts, int);
00081 
00084   int GetArrays(int len, int *dim, double *coord, int *lower, int *upper,
00085                 double *lowerDataCoord, double *upperDataCoord, int *npoints);
00086 
00089   int Equals(vtkBSPCuts *other, double tolerance = 0.0);
00090 
00091   void PrintTree();
00092   void PrintArrays();
00093 
00094 protected:
00095 
00096   vtkBSPCuts();
00097   ~vtkBSPCuts();
00098 
00099   static void DeleteAllDescendants(vtkKdNode *kd);
00100 
00101   static int CountNodes(vtkKdNode *kd);
00102   static void SetMinMaxId(vtkKdNode *kd);
00103   static void _PrintTree(vtkKdNode *kd, int depth);
00104 
00105   void BuildTree(vtkKdNode *kd, int idx);
00106   int WriteArray(vtkKdNode *kd, int loc);
00107 
00108   void ResetArrays();
00109   void AllocateArrays(int size);
00110 
00111   vtkKdNode *Top;
00112 
00113   // required cut information
00114 
00115   int NumberOfCuts;// number of cuts, also length of each array
00116   int *Dim;        // dimension (x/y/z - 0/1/2) where cut occurs
00117   double *Coord;   // location of cut along axis
00118   int *Lower;               // location in arrays of left (lower) child info
00119   int *Upper;               // location in arrays of right (lower) child info
00120 
00121   // optional cut information 
00122 
00123   double *LowerDataCoord;   // coordinate of uppermost data in lower half
00124   double *UpperDataCoord;   // coordinate of lowermost data in upper half
00125   int *Npoints;             // number of data values in partition
00126 
00127   double Bounds[6];    
00128 
00129   vtkBSPCuts(const vtkBSPCuts&); // Not implemented
00130   void operator=(const vtkBSPCuts&); // Not implemented
00131 };
00132 
00133 #endif

Generated by  doxygen 1.7.1