dox/Geovis/vtkGeoTreeNode.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkGeoTreeNode.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 /*-------------------------------------------------------------------------
00017   Copyright 2008 Sandia Corporation.
00018   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00019   the U.S. Government retains certain rights in this software.
00020 -------------------------------------------------------------------------*/
00021 
00027 #ifndef __vtkGeoTreeNode_h
00028 #define __vtkGeoTreeNode_h
00029 
00030 #include "vtkObject.h"
00031 #include "vtkSmartPointer.h" // for SP
00032 
00033 class vtkPolyData;
00034 
00035 class VTK_GEOVIS_EXPORT vtkGeoTreeNode : public vtkObject
00036 {
00037 public:
00038   static vtkGeoTreeNode *New();
00039   vtkTypeRevisionMacro(vtkGeoTreeNode, vtkObject);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041   
00043 
00045   vtkSetMacro(Id,unsigned long);
00046   vtkGetMacro(Id,unsigned long);
00048   
00050 
00051   vtkSetMacro(Level, int);
00052   vtkGetMacro(Level, int);
00054   
00056 
00057   vtkSetVector2Macro(LongitudeRange,double);
00058   vtkGetVector2Macro(LongitudeRange,double);
00059   vtkSetVector2Macro(LatitudeRange,double);
00060   vtkGetVector2Macro(LatitudeRange,double);
00062   
00065   void SetChild(vtkGeoTreeNode* node, int idx);
00066 
00070   void SetParent(vtkGeoTreeNode* node) {this->Parent = node;}
00071 
00073   int GetWhichChildAreYou();
00074 
00078   bool IsDescendantOf(vtkGeoTreeNode* elder);
00079 
00083   int CreateChildren();
00084 
00085 //BTX
00086   enum NodeStatus
00087     {
00088     NONE,
00089     PROCESSING
00090     };
00091 
00092   NodeStatus GetStatus();
00093   void SetStatus(NodeStatus status);
00094 //ETX
00095 
00096 protected:
00097   vtkGeoTreeNode();
00098   ~vtkGeoTreeNode();
00099 
00100   int Level;
00101   unsigned long Id;
00102 
00103   double LongitudeRange[2];
00104   double LatitudeRange[2];
00105 
00106 //BTX
00107   vtkSmartPointer<vtkGeoTreeNode> Children[4];
00108   NodeStatus Status;
00109 //ETX
00110   vtkGeoTreeNode* Parent;
00111 
00112 private:
00113   vtkGeoTreeNode(const vtkGeoTreeNode&);  // Not implemented.
00114   void operator=(const vtkGeoTreeNode&);  // Not implemented.
00115 };
00116 
00117 #endif

Generated on Thu Jan 8 14:38:31 2009 for VTK by  doxygen 1.4.7