3 #include <cgv/render/drawable.h>
4 #include "mesh_render_info.h"
5 #include <cgv/math/mfunc.h>
6 #include <cgv/media/axis_aligned_box.h>
7 #include <cgv/media/mesh/simple_mesh.h>
8 #include <cgv/media/mesh/streaming_mesh.h>
9 #include <cgv/media/illum/surface_material.h>
10 #include <cgv_gl/box_renderer.h>
11 #include <cgv_gl/sphere_renderer.h>
12 #include <cgv_gl/arrow_renderer.h>
13 #include <cgv_gl/rounded_cone_renderer.h>
15 #include "lib_begin.h"
46 std::vector<vec3> nml_gradient_geometry;
47 std::vector<vec3> nml_mesh_geometry;
57 double normal_threshold;
59 double consistency_threshold;
61 unsigned int max_nr_iters;
75 bool show_sampling_locations;
77 bool show_sampling_grid;
78 float sampling_grid_alpha;
84 bool show_gradient_normals;
86 bool show_mesh_normals;
90 rounded_cone_render_style crs;
105 void add_normal(
const dvec3& p,
const dvec3& n, std::vector<vec3>& nml_gradient_geometry)
const;
108 void new_vertex(
unsigned int vi);
110 void new_polygon(
const std::vector<unsigned int>& vertex_indices);
112 void before_drop_vertex(
unsigned int vertex_index);
120 bool save(
const std::string& file_name);
122 virtual void surface_extraction();
124 dvec3 compute_face_normal(
const std::vector<unsigned int> &vis,
dvec3* c = 0)
const;
128 void draw_implicit_surface(
context& ctx);
134 void set_function(
F* _func_ptr);
135 F* get_function()
const;
137 void set_resolution(
unsigned int _res);
138 unsigned int get_resolution()
const;
140 void enable_wireframe(
bool do_enable =
true);
141 bool is_wireframe_enabled()
const;
143 void enable_sampling_grid(
bool do_enable =
true);
144 bool is_sampling_grid_enabled()
const;
146 void enable_sampling_locations(
bool do_enable =
true);
147 bool is_sampling_locations_enabled()
const;
149 void enable_box(
bool do_enable =
true);
150 bool is_box_enabled()
const;
152 void enable_normals(
bool do_enable =
true);
153 bool are_normals_enabled()
const;
155 void set_epsilon(
double _epsilon);
156 double get_epsilon()
const;
158 void set_grid_epsilon(
double _grid_epsilon);
159 double get_grid_epsilon()
const;
161 void set_box(
const dbox3& _box);
162 const dbox3& get_box()
const;
164 unsigned int get_nr_triangles_of_last_extraction()
const;
165 unsigned int get_nr_vertices_of_last_extraction()
const;
172 void finish_frame(
context& ctx);
180 #include <cgv/config/lib_end.h>
boxes use surface render styles
Definition: box_renderer.h:19
Definition: sphere_renderer.h:19
cgv::media::axis_aligned_box< double, 3 > dbox3
type of axis aligned box used to define the tesselation domain
Definition: gl_implicit_surface_drawable_base.h:36
A column vector class.
Definition: fvec.h:13
cgv::math::v3_func< double, double > F
type of the function describing the implicit surface
Definition: gl_implicit_surface_drawable_base.h:34
Definition: gl_implicit_surface_drawable_base.h:31
NormalComputationType
normal computation type >
Definition: gl_implicit_surface_drawable_base.h:24
Definition: drawable.h:15
Definition: mesh_render_info.h:16
unsigned normal_index
normal index for face normals
Definition: gl_implicit_surface_drawable_base.h:118
ContouringType
type of contouring method >
Definition: gl_implicit_surface_drawable_base.h:22
the cgv namespace
Definition: vr_calib.cxx:9
void extract_mesh(const std::string &file_name, const fx::gltf::Document &doc, cgv::media::mesh::simple_mesh< float > &mesh, int mesh_index, int primitive_index)
extract simple mesh form gltf document
Definition: gltf_support.cxx:328
Definition: context.h:525
std::ostream * obj_out
of this output stream is defined, use it to write currently extracted surface to it
Definition: gl_implicit_surface_drawable_base.h:116
Definition: arrow_renderer.h:19