40#ifndef H_GEOGRAM_GFX_GUI_SIMPLE_MESH_APPLICATION_H
41#define H_GEOGRAM_GFX_GUI_SIMPLE_MESH_APPLICATION_H
44#include <geogram_gfx/gui/simple_application.h>
99 bool load(
const std::string& filename)
override;
104 bool save(
const std::string& filename)
override;
113 SimpleApplication::instance()
127 virtual void draw_edges();
128 virtual void draw_surface();
129 virtual void draw_volume();
142 const Mesh& M_in,
double* xyzmin,
double* xyzmax,
bool animate
191 show_vertices_ =
true;
198 show_vertices_ =
false;
205 show_surface_ =
true;
212 show_surface_ =
false;
226 show_volume_ =
false;
266 bool show_vertices_selection_;
267 float vertices_size_;
268 vec4f vertices_color_;
269 float vertices_transparency_;
272 bool show_surface_sides_;
277 bool show_surface_borders_;
278 vec4f surface_color_;
279 vec4f surface_color_2_;
284 bool show_colored_cells_;
286 bool show_connectors_;
288 bool show_attributes_;
289 index_t current_colormap_index_;
290 std::string attribute_;
291 MeshElementsFlags attribute_subelements_;
292 std::string attribute_name_;
293 float attribute_min_;
294 float attribute_max_;
#define geo_assert(x)
Verifies that a condition is met.
Draws a mesh using OpenGL.
An Application that manipulates a single Mesh.
void hide_surface()
Makes the surface facets invisible.
static SimpleMeshApplication * instance()
Gets the instance.
void get_bbox(const Mesh &M_in, double *xyzmin, double *xyzmax, bool animate)
Gets the bounding box of a mesh animation.
void GL_terminate() override
Deallocates OpenGL and GLUP objects.
void GL_initialize() override
Initializes OpenGL and GLUP objects.
virtual void show_attributes()
Makes the attributes visible.
void autorange()
Adjusts the current minimum and maximum attribute value to the currently bound attribute if any.
std::string supported_write_file_extensions() override
Gets the list of supported file extensions for writing.
static void increment_cells_shrink_callback()
increments the cells shrinkage.
void hide_vertices()
Makes the vertices invisible.
MeshGfx * mesh_gfx()
Gets the mesh graphics.
SimpleMeshApplication(const std::string &name)
Application constructor.
bool save(const std::string &filename) override
Saves the current content to a file.
virtual void draw_points()
Called at the beginning of draw_scene().
std::string attribute_names()
Gets the list of attribute names.
static void decrement_cells_shrink_callback()
decrements the cells shrinkage.
void show_volume()
Makes the volume cells visible.
static void decrement_anim_time_callback()
derements the animation time in the current instance.
void show_vertices()
Makes the vertices visible.
void geogram_initialize(int argc, char **argv) override
std::string supported_read_file_extensions() override
Gets the list of supported file extensions for reading.
void hide_volume()
Makes the volume cells invisible.
void draw_object_properties() override
Draws the contents of the object properties window.
bool load(const std::string &filename) override
Loads a file.
Mesh * mesh()
Gets the mesh.
void show_surface()
Makes the surface facets visible.
void set_attribute(const std::string &attribute)
Sets the currently displayed attribute.
void draw_scene() override
Draws the scene.
virtual void hide_attributes()
Makes the attributes invisible.
static void increment_anim_time_callback()
increments the animation time in the current instance.
#define GEOGRAM_GFX_API
Linkage declaration for geogram symbols.
Common include file, providing basic definitions. Should be included before anything else by all head...
A class to display a mesh using OpenGL/GLUP.
Global Vorpaline namespace.
geo_index_t index_t
The type for storing and manipulating indices.