00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 #ifndef __VOXEL_2_H__
00022 #define __VOXEL_2_H__
00023 
00024 #include "voxel.h"
00025 
00047 class voxel_2_c : public voxel_c {
00048 
00049   public:
00050 
00051     voxel_2_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) {}
00052     voxel_2_c(xmlParser_c & pars, const gridType_c * gt) : voxel_c(pars, gt) {}
00053     voxel_2_c(const voxel_c & orig) : voxel_c(orig) { }
00054     voxel_2_c(const voxel_c * orig) : voxel_c(orig) { }
00055 
00056     void transformPoint(int * x, int * y, int * z, unsigned int trans) const;
00057     bool transform(unsigned int nr);
00058     void minimizePiece(void);
00059 
00060     bool getNeighbor(unsigned int idx, unsigned int typ, int x, int y, int z, int * xn, int *yn, int *zn) const;
00061 
00062     void initHotspot(void);
00063 
00064     void resizeInclude(int & px, int & py, int & pz);
00065 
00066     virtual bool validCoordinate(int x, int y, int z) const;
00067     bool onGrid(int x, int y, int z) const;
00068 
00069     virtual Polyhedron * getMesh(float sphere_rad, float connection_rad, float round, float offset, int recursion, float inner_rad, float hole_diam) const;
00070     virtual Polyhedron * getDrawingMesh(void) const;
00071     virtual Polyhedron * getWireframeMesh(void) const;
00072     virtual void getConnectionFace(int x, int y, int z, int n, double bevel, double offset, std::vector<float> & ) const;
00073     virtual void calculateSize(float * x, float * y, float * z) const;
00074     virtual void recalcSpaceCoordinates(float * , float * , float * ) const;
00075 
00076   private:
00077 
00078     virtual Polyhedron * getMeshInternal(float sphere_rad, float connection_rad, float round, float offset, int recursion, float inner_rad, float hole_diam, bool fast) const;
00079 
00080     
00081     void operator=(const voxel_2_c&);
00082 };
00083 
00084 #endif