-
Notifications
You must be signed in to change notification settings - Fork 1
/
gl_implicit_surface_drawable.h
41 lines (37 loc) · 1.25 KB
/
gl_implicit_surface_drawable.h
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
#pragma once
#include <cgv_gl/gl/gl_implicit_surface_drawable_base.h>
#include <cgv/base/base.h>
#include <cgv/gui/provider.h>
#include <cgv/gui/event_handler.h>
/** drawable that visualizes implicit surfaces by contouring them with marching cubes or
dual contouring. */
class gl_implicit_surface_drawable :
public cgv::base::node,
public cgv::gui::provider,
public cgv::gui::event_handler,
public cgv::render::gl::gl_implicit_surface_drawable_base
{
protected:
double map_to_zero_value = -1;
double map_to_one_value = 1;
unsigned volume_resolution = 256;
cgv::render::view* view_ptr;
void toggle_range();
void adjust_range();
void export_volume();
void extract_mesh();
void save_interactive();
void resolution_change();
void surface_extraction();
public:
/// standard constructor does not initialize the function pointer such that nothing is drawn
gl_implicit_surface_drawable(const std::string& name);
void on_set(void* member_ptr);
bool self_reflect(cgv::reflect::reflection_handler& rh);
std::string get_type_name() const;
void stream_help(std::ostream& os);
bool handle(cgv::gui::event& e);
bool init(cgv::render::context& ctx);
void create_gui();
};
typedef cgv::data::ref_ptr<gl_implicit_surface_drawable> gl_implicit_surface_drawable_ptr;