00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __GU_Surfacer_h__
00020 #define __GU_Surfacer_h__
00021
00022 #include "GU_API.h"
00023 #include "GU_Detail.h"
00024 #include <UT/UT_HashTable.h>
00025
00026 class GU_PrimPoly;
00027
00028 class GU_API GU_Surfacer
00029 {
00030 public:
00031 GU_Surfacer(GU_Detail &gdp,
00032 const UT_Vector3 &pos,
00033 const UT_Vector3 &size,
00034 int xdivs, int ydivs, int zdivs,
00035 bool do_normals);
00036 virtual ~GU_Surfacer();
00037
00038
00039
00040 void addCell(int x, int y, int z, const fpreal density[8], const UT_Vector3 gradient[8]);
00041
00042 protected:
00043
00044 virtual void pointAdded(GEO_Point *pt, int idx0, int idx1, fpreal u) {}
00045
00046 virtual void polygonAdded(GEO_PrimPoly *poly) {}
00047
00048 private:
00049 GU_Detail &myGdp;
00050 UT_Vector3 myP;
00051 UT_Vector3 mySize;
00052 UT_Vector3 myStepSize;
00053 int myXDivs;
00054 int myYDivs;
00055 int myZDivs;
00056 int myNormalOffset;
00057 UT_HashTable myPoints;
00058 };
00059
00060 #endif