?? octree.h
字號:
#if !defined (OCTREE_H__INCLUDE_)
#define OCTREE_H__INCLUDE_
typedef double* Vec3;
extern Vec3 makeVec3( double x, double y, double z);
/* ------------------------------------------------------------------------ */
class pvex_nor
{
public:
pvex_nor(double xx,double yy,double zz){x=xx;y=yy;z=zz;};
double x,y,z;
//CPtrList Vex,Normal;
};
typedef struct {
Vec3 p[3];
} TRIANGLE;
typedef struct {
Vec3 p[8];
double val[8];
} GRIDCELL;
typedef struct _Octree
{
Vec3 min; /* bounds */
Vec3 max;
double value[8];
int density;
char at_max_depth;
char not_fully_divided;
CPtrList vex;
CPtrList normal;
struct _Octree** children;
} Octree;
extern Octree* make_octree( Vec3 min, Vec3 max );
extern void isoface(Octree* o);
extern int subdivide_octree( int min_depth, int max_depth, Octree* o );
extern int octree_needs_to_be_split( Octree* o );
void marchingcube(int depth,Octree *o);
/* the first function of interest is:
evaluatePoint( )
which takes a 3d point and returns a double value indicating which feature
this point is nearet to.
see the custom.c file for some examples
*/
extern double evaluate_point( Vec3 pos,Octree *o );
extern int evaluate1_point( Octree* o);
/* the other function of interest is:
octreeNeedToBeSplit( )
which determines whether subdivision needs to take place.
it should examine the 8 corner values and
return 1 to subdivide and 0 to not subdivide.
see the custom.c file for some examples
*/
extern int octree_needs_to_be_subdivided( Octree* o );
/* ------------------------------------------------------------------------ */
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -