Branch
Hash :
36df94af
Author :
Thomas de Grivel
Date :
2025-03-02T16:13:53
Change copyright wording and extend to 2025
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
/* kc3
* Copyright from 2022 to 2025 kmx.io <contact@kmx.io>
*
* Permission is hereby granted to use this software granted the above
* copyright notice and this permission paragraph are included in all
* copies and substantial portions of this software.
*
* THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
* PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
#ifndef KUBZ_GL_MARCHING_CUBES_H
#define KUBZ_GL_MARCHING_CUBES_H
#include <libkc3/types.h>
#include "types.h"
/* Stack-allocation compatible functions, call gl_marching_cubes_clean
after use. */
void
gl_marching_cubes_clean (s_gl_marching_cubes *marching_cubes);
s_gl_marching_cubes *
gl_marching_cubes_init (s_gl_marching_cubes *marching_cubes,
u32 *dimension);
/* Heap-allocation functions, call gl_marching_cubes_delete after use. */
void
gl_marching_cubes_delete (s_gl_marching_cubes *marching_cubes);
s_gl_marching_cubes *
gl_marching_cubes_new (u32 *dimension);
/* Observers. */
f32
gl_marching_cubes_f (s_gl_marching_cubes *marching_cubes, u32 i, u32 j,
u32 k);
void
gl_marching_cubes_render (s_gl_marching_cubes *marching_cubes);
void
gl_marching_cubes_render_points (s_gl_marching_cubes *marching_cubes);
/* Operators. */
f32 *
gl_marching_cubes_f_w (s_gl_marching_cubes *marching_cubes, u32 i,
u32 j, u32 k);
void
gl_marching_cubes_sphere (s_gl_marching_cubes *marching_cubes,
s_vec3 *center, f32 center_value,
f32 radius);
bool
gl_marching_cubes_update (s_gl_marching_cubes *marching_cubes);
void
gl_marching_cubes_zero (s_gl_marching_cubes *marching_cubes);
#endif /* KUBZ_GL_MARCHING_CUBES_H */