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