lunchbreak updates
This commit is contained in:
@ -45,6 +45,18 @@ namespace fractallevelset
|
||||
|
||||
__device__ __host__ int isignf(float f);
|
||||
|
||||
struct main_functionpars
|
||||
{
|
||||
public:
|
||||
int fractaliter;
|
||||
float threshold;
|
||||
float freezethresh;
|
||||
};
|
||||
|
||||
float main_function(cuvec3f pos, main_functionpars &pars);
|
||||
|
||||
|
||||
|
||||
class bagoftriangles
|
||||
{
|
||||
public:
|
||||
@ -52,6 +64,7 @@ class bagoftriangles
|
||||
|
||||
__host__ int ntris() const {return vertices.length/9;}
|
||||
__host__ int nverts() const {return vertices.length/3;}
|
||||
__host__ int resize_tris(const int ntris);
|
||||
|
||||
__host__ bagoftriangles();
|
||||
__host__ ~bagoftriangles();
|
||||
@ -67,8 +80,8 @@ public:
|
||||
cuvec3f p1;
|
||||
cuvec3f p2;
|
||||
|
||||
cuvec3f normal() const;
|
||||
float area() const;
|
||||
__device__ __host__ cuvec3f normal() const;
|
||||
__device__ __host__ float area() const;
|
||||
__device__ __host__ triangle();
|
||||
__device__ __host__ ~triangle();
|
||||
};
|
||||
@ -106,6 +119,9 @@ class tetrahedron_feinds
|
||||
|
||||
};
|
||||
|
||||
__device__ __host__ int mt_count_triangles(const tetrahedron_feinds &fevals);
|
||||
__device__ __host__ int mt_find_triangles(const tetrahedron &tet, const tetrahedron_feinds &fevals, triangle &tri1, triangle &tri2);
|
||||
|
||||
class mtcube
|
||||
{
|
||||
public:
|
||||
@ -120,7 +136,11 @@ class mtcube
|
||||
//face center nodes 9,10,11,12,13,14
|
||||
__device__ __host__ tetrahedron get_tetrahedron(const int tet_index) const; //tet_index [0,24)
|
||||
__device__ __host__ tetrahedron_feinds get_feinds(const int tet_index) const; //tet_index [0,24)
|
||||
__device__ __host__ void eval_function(); //calls a function under consideration at each of the 15 node points
|
||||
__device__ __host__ void eval_function(main_functionpars &pars); //calls a function under consideration at each of the 15 node points
|
||||
|
||||
__device__ __host__ int count_triangles();
|
||||
__device__ __host__ void fill_trianglebuffer(float *buffer, int &offset); //fills from offset to offset+ntris*3*3 with the triangles calculated from fevals. Increments offset.
|
||||
__device__ __host__ float count_triarea(); //counts triangle area without filling a buffer or retaining the mesh
|
||||
|
||||
__device__ __host__ mtcube();
|
||||
__device__ __host__ ~mtcube();
|
||||
@ -135,12 +155,18 @@ struct marchingtet_pars
|
||||
int Ny;
|
||||
int Nz;
|
||||
|
||||
int fractaliter;
|
||||
main_functionpars pars;
|
||||
|
||||
__device__ __host__ marchingtet_pars();
|
||||
};
|
||||
|
||||
|
||||
///////////
|
||||
// Tests //
|
||||
///////////
|
||||
void test_tetorientation();
|
||||
void test_mtcube_triangulation();
|
||||
void test_marchingtets();
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user