00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __VOXEL_3_H__
00022 #define __VOXEL_3_H__
00023
00024 #include "voxel_0.h"
00025
00055 class voxel_3_c : public voxel_0_c {
00056
00057 public:
00058
00059 voxel_3_c(unsigned int x, unsigned int y, unsigned int z, const gridType_c * gt, voxel_type init = 0) : voxel_0_c(x, y, z, gt, init) {}
00060 voxel_3_c(xmlParser_c & pars, const gridType_c * gt) : voxel_0_c(pars, gt) {}
00061 voxel_3_c(const voxel_c & orig) : voxel_0_c(orig) { }
00062 voxel_3_c(const voxel_c * orig) : voxel_0_c(orig) { }
00063
00064 virtual bool transform(unsigned int nr);
00065
00066 bool getNeighbor(unsigned int idx, unsigned int typ, int x, int y, int z, int * xn, int *yn, int *zn) const;
00067
00068 void scale(unsigned int amount, bool grid);
00069 bool scaleDown(unsigned char by, bool action);
00070 void resizeInclude(int & px, int & py, int & pz);
00071 void minimizePiece(void);
00072
00073 virtual bool validCoordinate(int x, int y, int z) const;
00074 bool identicalInBB(const voxel_c * op, bool includeColors = true) const;
00075 bool onGrid(int x, int y, int z) const;
00076
00077 virtual bool meshParamsValid(double bevel, double offset) const;
00078 void getConnectionFace(int x, int y, int z, int n, double bevel, double offset, std::vector<float> & faceCorners) const;
00079 void calculateSize(float * x, float * y, float * z) const;
00080 void recalcSpaceCoordinates(float * x, float * y, float * z) const;
00081
00082 private:
00083
00084
00085 void operator=(const voxel_3_c&);
00086 };
00087
00088 #endif