00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __GRID_TYPE_H__
00022 #define __GRID_TYPE_H__
00023
00024 #include "types.h"
00025
00026 #include "bt_assert.h"
00027
00028 class assembler_c;
00029 class symmetries_c;
00030 class voxel_c;
00031 class problem_c;
00032 class stlExporter_c;
00033 class movementCache_c;
00034 class xmlWriter_c;
00035 class xmlParser_c;
00036
00046 class gridType_c {
00047
00048 public:
00049
00051 typedef enum {
00052 GT_BRICKS,
00053 GT_TRIANGULAR_PRISM,
00054 GT_SPHERES,
00055 GT_RHOMBIC,
00056 GT_TETRA_OCTA,
00057
00058 GT_NUM_GRIDS
00059 } gridType;
00060
00062 typedef enum {
00063 CAP_ASSEMBLE = 1,
00064 CAP_DISASSEMBLE = 2,
00065 CAP_STLEXPORT = 4
00066 } capabilities;
00067
00068 protected:
00069
00071 gridType type;
00072
00080 mutable symmetries_c * sym;
00081
00082 public:
00083
00087 gridType_c(xmlParser_c & pars);
00088
00090 gridType_c(const gridType_c&);
00091
00093 void save(xmlWriter_c & xml) const;
00094
00095
00096
00098 gridType_c(void);
00099
00101 gridType_c(gridType gt);
00102
00103 ~gridType_c(void);
00104
00106 gridType getType(void) const { return type; }
00107
00108 unsigned int getCapabilities(void) const;
00109
00111 movementCache_c * getMovementCache(const problem_c * puz) const;
00112
00114 voxel_c * getVoxel(unsigned int x, unsigned int y, unsigned int z, voxel_type init) const;
00116 voxel_c * getVoxel(xmlParser_c & pars) const;
00118 voxel_c * getVoxel(const voxel_c & orig) const;
00120 voxel_c * getVoxel(const voxel_c * orig) const;
00121
00127 const symmetries_c * getSymmetries(void) const;
00128
00130 stlExporter_c * getStlExporter(void) const;
00131
00142 static assembler_c * findAssembler(const problem_c * p);
00143
00144 private:
00145
00146
00147 void operator=(const gridType_c&);
00148 };
00149
00150 #endif