00001 //************************************************************************************// 00002 // Module : morton_keygen.cpp 00003 // Date : 8/25/03 (DLR) 00004 // Copyright : 2003-2006 Copyright University Corporation for Atmospheric 00005 // Research 00006 // Description : Encapsulates the access methods and data associated with 00007 // defining a Morton-type key-generator, as used in GASpAR. 00008 // objects 00009 // Derived From : Morton_KeyGen 00010 // Modifications: 00011 //************************************************************************************// 00012 #if !defined(MORTON_KEYGEN_HPP) 00013 #define MORTON_KEYGEN_HPP 00014 00015 #include "gtypes.h" 00016 #include <iostream.h> 00017 #include <stdlib.h> 00018 #include "point.hpp" 00019 #include "gkeygen.hpp" 00020 #include "bitblock.hpp" 00021 00022 class Morton_KeyGen: public GKeyGen 00023 { 00024 public: 00025 enum MORTON_TYPE {MORTON_PARTIAL_INTERLEAVE, MORTON_FULL_INTERLEAVE}; 00026 00027 Morton_KeyGen(MORTON_TYPE type=MORTON_FULL_INTERLEAVE); 00028 ~Morton_KeyGen(); 00029 00030 void SetType(MORTON_TYPE type); // Set Morton-order method 00031 void SetOrigin(Point3D &P0); // Set coord origin 00032 void SetBox(Point &inP0, Point &inP1); // Set grid bding box 00033 void SetIntegralLen(Point3D &dX); // Set integral length 00034 void SetDoLog(GBOOL bDoLog); // Set btakelog_ flag 00035 void key(void *id, GINT idsz, Point3D point[], GINT n=1); // Get key/id data 00036 void key(void *id, GINT idsz, GDOUBLE *x [], GINT n=1); // Get key/id data 00037 00038 00039 private: 00040 00041 // Member data: 00042 MORTON_TYPE itype_; 00043 GINT ksz_; 00044 GBOOL btakelog_; 00045 GDOUBLE logFact_; 00046 GDOUBLE delmax_; 00047 GDOUBLE idelmax_; 00048 GDOUBLE idel_; 00049 Point3D P0_; 00050 Point3D P1_; 00051 Point3D idX_; 00052 Point3D dX_; 00053 BitBlock *bb; 00054 }; 00055 00056 #endif