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

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 
00097 
00099   virtual void ShallowCopy(vtkGeoTreeNode *src);  
00100   virtual void DeepCopy(vtkGeoTreeNode *src);
00102 
00103 protected:
00104   vtkGeoTreeNode();
00105   ~vtkGeoTreeNode();
00106 
00107   int Level;
00108   unsigned long Id;
00109 
00110   double LongitudeRange[2];
00111   double LatitudeRange[2];
00112 
00113 //BTX
00114   vtkSmartPointer<vtkGeoTreeNode> Children[4];
00115   vtkGeoTreeNode * Parent;
00116   NodeStatus Status;
00117 //ETX
00118   
00119 
00120 private:
00121   vtkGeoTreeNode(const vtkGeoTreeNode&);  // Not implemented.
00122   void operator=(const vtkGeoTreeNode&);  // Not implemented.
00123 };
00124 
00125 #endif

Generated by  doxygen 1.7.1