00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __VOXEL_1_H__
00022 #define __VOXEL_1_H__
00023
00024 #include "voxel.h"
00025
00039 class voxel_1_c : public voxel_c {
00040
00041 public:
00042
00043 voxel_1_c(unsigned int x, unsigned int y, unsigned int z, const gridType_c * gt, voxel_type init = 0) : voxel_c(x, y, z, gt, init) {}
00044 voxel_1_c(xmlParser_c & pars, const gridType_c * gt) : voxel_c(pars, gt) {}
00045 voxel_1_c(const voxel_c & orig) : voxel_c(orig) { }
00046 voxel_1_c(const voxel_c * orig) : voxel_c(orig) { }
00047
00048 void transformPoint(int * x, int * y, int * z, unsigned int trans) const;
00049 bool transform(unsigned int nr);
00050
00051 void minimizePiece(void);
00052 bool identicalInBB(const voxel_c * op, bool includeColors = true) const;
00053
00054 bool getNeighbor(unsigned int idx, unsigned int typ, int x, int y, int z, int * xn, int *yn, int *zn) const;
00055
00056 virtual void scale(unsigned int amount, bool grid);
00057 void resizeInclude(int & px, int & py, int & pz);
00058
00059 bool validCoordinate(int x, int y, int z) const;
00060 bool onGrid(int x, int y, int z) const;
00061
00062 virtual bool meshParamsValid(double bevel, double offset) const;
00063 virtual void getConnectionFace(int x, int y, int z, int n, double bevel, double offset, std::vector<float> & faceCorners) const;
00064 virtual void calculateSize(float * x, float * y, float * z) const;
00065 virtual void recalcSpaceCoordinates(float * x, float * y, float * ) const;
00066
00067 private:
00068
00069
00070 void operator=(const voxel_1_c&);
00071 };
00072
00073 #endif