extract explicit mesh with topology information from implicit surfaces with boolean operations, and do surface/volume integrating on them.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

43 lines
1.2 KiB

#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <macros.h>
#include <math/math_defs.h>
#include <io_blobtree.h>
#include <settings.h>
typedef struct {
const vector3d* vertices;
const uint32_t* faces; // indices of vertices in each face
const uint32_t* vertex_counts; // number of vertices in each face
uint32_t num_vertices;
uint32_t num_faces;
} polymesh_t;
typedef struct {
polymesh_t mesh;
bool success;
} primitive_generation_result_t;
EXTERN_C_BEGIN
// forward declartions
class implicit_network_solver;
API implicit_network_solver* create_solver(const baked_blobtree_t* tree, const s_settings settings) noexcept;
API void destroy_solver(implicit_network_solver* solver) noexcept;
API primitive_generation_result_t generate_polymesh(implicit_network_solver* solver);
// output time usage statistics to console
API void print_statistics(const implicit_network_solver* solver);
API void clear_statistics(implicit_network_solver* solver);
// // clear the cache of previous solver results
// // CAUTION: output result should be invalid after calling this function
// API void clear_solver_cache();
EXTERN_C_END