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>
106 bool load(
const std::string& filename)
override;
111 bool save(
const std::string& filename)
override;
120 SimpleApplication::instance()
135 virtual void draw_edges();
136 virtual void draw_surface();
137 virtual void draw_volume();
150 const Mesh& M_in,
double* xyzmin,
double* xyzmax,
bool animate
201 void jump_to_file(
int relative_index);
225 show_vertices_ =
true;
232 show_vertices_ =
false;
239 show_surface_ =
true;
246 show_surface_ =
false;
260 show_volume_ =
false;
300 bool show_vertices_selection_;
301 float vertices_size_;
302 vec4f vertices_color_;
303 float vertices_transparency_;
306 bool show_surface_sides_;
311 bool show_surface_borders_;
312 vec4f surface_color_;
313 vec4f surface_color_2_;
318 bool show_colored_cells_;
320 bool show_connectors_;
322 bool show_attributes_;
323 index_t current_colormap_index_;
324 std::string attribute_;
325 MeshElementsFlags attribute_subelements_;
326 std::string attribute_name_;
327 float attribute_min_;
328 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.
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.
SimpleMeshApplication(const std::string &name)
Application constructor.
static SimpleMeshApplication * instance()
Gets the instance.
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.
Mesh * mesh()
Gets the mesh.
static void decrement_cells_shrink_callback()
decrements the cells shrinkage.
void show_volume()
Makes the volume cells visible.
static void last_file()
Loads the last file in the current directory.
static void decrement_anim_time_callback()
derements the animation time in the current instance.
void show_vertices()
Makes the vertices visible.
static void first_file()
Loads the first file in the current directory.
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.
static void next_file()
Loads the next file.
bool load(const std::string &filename) override
Loads a file.
MeshGfx * mesh_gfx()
Gets the mesh graphics.
static void prev_file()
Loads the previous file.
void show_surface()
Makes the surface facets visible.
void set_attribute(const std::string &attribute)
Sets the currently displayed attribute.
void install_key_file_navigation()
Installs key navigation callbacks.
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.