### Key File Navigation Installation Source: https://brunolevy.github.io/geogram/simple__mesh__application_8h_source Installs callbacks for navigating files using keyboard input, enhancing user interaction. ```C++ void install_key_file_navigation() Installs key navigation callbacks. ``` -------------------------------- ### Geogram Application Initialization Source: https://brunolevy.github.io/geogram/classGEO_1_1Application Handles the initialization of the Geogram application, including argument parsing and callback setup. The `geogram_initialize` function is the entry point for starting the application, and `declare_args` allows for custom argument definition. ```cpp virtual void | geogram_initialize (int argc, char **argv) virtual void | declare_args () | Called by geogram_initialize(), right before parsing command line arguments. void | **callbacks_initialize** () | Initializes the callbacks if not already initialized. ``` -------------------------------- ### Setup GLUP Context Source: https://brunolevy.github.io/geogram/GLUP__context_8h_source Performs the initial setup of the GLUP context, including creating uniform state and compiling GLSL programs. This is a virtual method. ```cpp virtual void setup() ``` -------------------------------- ### start() Source: https://brunolevy.github.io/geogram/classGEO_1_1Application Starts the main event loop of the application. Optionally accepts command line arguments for initialization. ```APIDOC ## start(int _argc_ = 0, char ** _argv_ = nullptr) ### Description Starts the main event loop of the application. ### Parameters - **_argc_** (int) - in - optional command line parameters. If specified then they are used to initialize geogram, else geogram is supposed to be already initialized by caller. - **_argv_** (char **) - in - optional command line parameters. If specified then they are used to initialize geogram, else geogram is supposed to be already initialized by caller. ### Method POST ### Endpoint /websites/brunolevy_github_io_geogram/start ``` -------------------------------- ### Start New ImGui Frame Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Notifies the ImGui library that a new frame has started. This is typically called at the beginning of each rendering cycle before drawing UI elements. ```c++ virtual void | ImGui_new_frame () ``` -------------------------------- ### GEO::ProgressTask::start_time() - Get Task Start Time Source: https://brunolevy.github.io/geogram/classGEO_1_1ProgressTask Retrieves the start time of the task. This is an inline method, defined in progress.h. ```C++ inline double GEO::ProgressTask::start_time() const ``` -------------------------------- ### Instance and Initialization Source: https://brunolevy.github.io/geogram/simple__mesh__application_8h_source Provides access to the singleton instance of the application and handles the initial setup with command-line arguments. ```C++ static SimpleMeshApplication * instance() Gets the instance. SimpleMeshApplication(const std::string &name) Application constructor. void geogram_initialize(int argc, char **argv) override Initializes Geogram. ``` -------------------------------- ### vertex_first_bundle() Source: https://brunolevy.github.io/geogram/classGEO_1_1MeshSurfaceIntersection_1_1RadialBundles Gets the first bundle starting from a vertex. Bundles starting from the same vertex are chained. It takes a vertex index as input and returns the index of the first bundle starting from that vertex or NO_INDEX if none exists. ```APIDOC ## GET /websites/brunolevy_github_io_geogram/vertex_first_bundle ### Description Gets the first bundle starting from a vertex. Bundles starting from the same vertex are chained. ### Method GET ### Endpoint /websites/brunolevy_github_io_geogram/vertex_first_bundle ### Parameters #### Path Parameters - **_v_** (index_t) - Required - The vertex index. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **index_t** - The index of the first bundle starting from `v`, or NO_INDEX if there is no such bundle. #### Response Example ```json { "bundle_index": 456 } ``` ``` -------------------------------- ### Get First Bundle from Vertex - C++ Source: https://brunolevy.github.io/geogram/classGEO_1_1MeshSurfaceIntersection_1_1RadialBundles Finds the first bundle that starts from a given vertex. Bundles starting from the same vertex are chained. Returns the index of the first bundle or NO_INDEX if none exists. ```cpp inline index_t GEO::MeshSurfaceIntersection::RadialBundles::vertex_first_bundle(index_t _v_) const ``` -------------------------------- ### Initialize ImGui Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Initializes the ImGui (Immediate Mode GUI) library for user interface rendering. ```cpp void ImGui_initialize () override ``` -------------------------------- ### Get First Vertex of Polyline in C++ Source: https://brunolevy.github.io/geogram/mesh__surface__intersection__internal_8h_source Retrieves the first vertex of a specified polyline. It accesses the first halfedge of the polyline and then uses the Halfedges class to get its starting vertex. ```cpp index_t first_vertex(index_t polyline) const { index_t h = H_[polyline_start_[polyline]]; return CF_.halfedges_.vertex(h,0); } ``` -------------------------------- ### Draw Scene Begin (GEO::SimpleApplication) Source: https://brunolevy.github.io/geogram/functions_d Executes setup operations before drawing the scene in GEO::SimpleApplication. This might include clearing buffers or setting up rendering states. ```GEO draw_scene_begin() : GEO::SimpleApplication ``` -------------------------------- ### ProgressTask::start_time() Method Source: https://brunolevy.github.io/geogram/classGEO_1_1ProgressTask Gets the start time of the task. This returns the time point when the ProgressTask object was created as a double. ```cpp #include // Example usage: // ProgressTask task("Timing Task", 10); // double startTime = task.start_time(); ``` -------------------------------- ### Get Dimension - C++ Source: https://brunolevy.github.io/geogram/classGEOGen_1_1ConvexCell Retrieves the dimension of the ConvexCell. This inline function returns the dimensionality, for example, 3 for a 3D cell. ```cpp inline coord_index_t GEOGen::ConvexCell::dimension() const ``` -------------------------------- ### GEO::SimpleMeshApplication::install_key_file_navigation Source: https://brunolevy.github.io/geogram/simple__mesh__application_8h_source Installs key navigation callbacks. This enables keyboard-driven control for file browsing. ```APIDOC ## GEO::SimpleMeshApplication::install_key_file_navigation ### Description Installs key navigation callbacks. ### Method void ### Endpoint N/A (Method within a class) ### Parameters None ### Request Example N/A ### Response N/A ``` -------------------------------- ### Draw Help Information Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Draws help information, such as keyboard accelerators and usage instructions. ```cpp virtual void draw_help () ``` -------------------------------- ### Get Dimension Source: https://brunolevy.github.io/geogram/optimal__transport_8h_source Returns the dimension of the space in which the optimal transport map is computed. This is a fundamental property of the problem setup. ```C++ index_t dimension() const Gets the dimension. ``` -------------------------------- ### Stopwatch Time Measurement Functions (C++) Source: https://brunolevy.github.io/geogram/classGEO_1_1Stopwatch Provides functions to get the elapsed user time since Stopwatch construction and the current time since epoch. It also includes functions to print elapsed time and get process start time. ```cpp #include // Get user elapsed time in seconds double elapsed = GEO::Stopwatch::elapsed_time(); // Get current time since epoch in seconds double currentTime = GEO::Stopwatch::now(); // Print elapsed time to logger (always) GEO::Stopwatch::print_elapsed_time(); // Get total elapsed time since process start in seconds double processTime = GEO::Stopwatch::process_elapsed_time(); // Initialize stopwatch statistics GEO::Stopwatch::initialize(); // Show stopwatch statistics GEO::Stopwatch::show_stats(); ``` -------------------------------- ### Initialize Callbacks Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Initializes the callback system for handling events, such as user input or window events. Ensures that callbacks are set up only once. ```c++ void | callbacks_initialize () ``` -------------------------------- ### File Navigation and Loading/Saving Source: https://brunolevy.github.io/geogram/simple__mesh__application_8h_source Provides methods for navigating through files and handling the loading and saving of mesh data. These methods are overrides from the base SimpleApplication class. ```cpp bool load(const std::string& filename) override; bool save(const std::string& filename) override; void install_key_file_navigation(); static void next_file(); static void prev_file(); static void first_file(); static void last_file(); void jump_to_file(int relative_index); ``` -------------------------------- ### Get Maximum Used Memory - GeogramLib Source: https://brunolevy.github.io/geogram/process_8h_source Returns the peak memory usage of the GeogramLib process since its start. Measured in bytes. ```C++ GEO::Process::max_used_memory() ``` -------------------------------- ### Get Cell Facets Begin Source: https://brunolevy.github.io/geogram/mesh_8h_source Provides the starting index for iterating through the facets of a cell. Facets represent the boundary surfaces of a cell. ```cpp GEO::MeshCellsStore::facets_begin index_t facets_begin(index_t c) const ``` -------------------------------- ### Application Initialization and Configuration Source: https://brunolevy.github.io/geogram/simple__application_8h_source Methods for initializing the application's OpenGL context and declaring command-line arguments. Also includes functions to set the application style and default filename. ```cpp GEO::SimpleApplication::declare_args void declare_args() override Called by geogram_initialize(), right before parsing command line arguments. ``` ```cpp GEO::SimpleApplication::set_style void set_style(const std::string &style) override Sets the style of the application. ``` ```cpp GEO::SimpleApplication::GL_initialize void GL_initialize() override Initializes OpenGL and GLUP objects. ``` ```cpp GEO::SimpleApplication::set_default_filename void set_default_filename(const std::string &filename) Sets the default filename used to save the current file. **Definition** simple_application.h:453 ``` -------------------------------- ### setup_immediate_buffers() Source: https://brunolevy.github.io/geogram/classGLUP_1_1Context Sets up the necessary buffers (VBOs and VAO) for immediate rendering operations. ```APIDOC ## POST /GLUP/Context/setup_immediate_buffers ### Description Sets up the buffers for immediate rendering. This creates VBOs and the VAO. ### Method POST ### Endpoint /GLUP/Context/setup_immediate_buffers ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) This method has a void return type, indicating success by completion. #### Response Example None ``` -------------------------------- ### Get Facet Corners Begin Index (Geogram) Source: https://brunolevy.github.io/geogram/mesh__geometry_8h_source Returns the starting index for iterating over the corners of a given facet in a Geogram mesh. ```C++ index_t corners_begin(index_t f) const /* Gets the first element for iterating over the corners of a facet. */ ``` -------------------------------- ### Get Base Memory Address Source: https://brunolevy.github.io/geogram/image_8h_source Retrieves the starting memory address of the image's data buffer. Returns an untyped pointer. ```cpp Memory::pointer base_mem() const ``` -------------------------------- ### Create Window with GLFW Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Creates the application window using the GLFW library. GLFW is a cross-platform library for creating windows, handling input, and managing OpenGL contexts. ```c++ virtual void | create_window () ``` -------------------------------- ### Draw Load Menu Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Draws the menu for loading files, including a file browser. ```cpp virtual void draw_load_menu () ``` -------------------------------- ### Get Root Node (C++) Source: https://brunolevy.github.io/geogram/classGEO_1_1AdaptiveKdTree Retrieves the index of the root node of the k-d tree, used as the starting point for traversal algorithms. ```cpp index_t root() const ``` -------------------------------- ### Setup State Variables (C++) Source: https://brunolevy.github.io/geogram/GLUP__context_8h_source Initializes or sets up various rendering state variables required for drawing operations. This is a general-purpose setup function. ```cpp virtual void setup_state_variables(); ``` -------------------------------- ### SimpleApplication Framework in Geogram Source: https://brunolevy.github.io/geogram/structGEO_1_1SimpleApplication_1_1ColormapInfo-members Documentation for the SimpleApplication framework, which provides a basic structure for building Geogram applications. Covers initialization, drawing, user interface elements, and command handling. ```C++ SimpleApplication ColormapInfo add_key_func add_key_toggle browse can_load char_callback command_line_arg_changed cursor_pos_callback declare_args draw_about draw_application_icons draw_application_menus draw_command_line_editor draw_command_window draw_console draw_fileops_menu draw_graphics draw_gui draw_help draw_load_menu draw_menu_bar draw_object_properties draw_object_properties_window draw_save_menu draw_scene draw_scene_begin draw_scene_end draw_viewer_properties draw_viewer_properties_window draw_windows_menu drop_callback geogram_initialize get_region_of_interest GL_initialize GL_terminate hide_console hide_text_editor home ImGui_initialize init_colormap init_colormaps key_callback load mouse_button_callback post_draw ``` -------------------------------- ### Get Cell Corners Begin Source: https://brunolevy.github.io/geogram/mesh_8h_source Retrieves the starting index for iterating over the corners of a cell. This is essential for accessing each corner vertex's data. ```cpp GEO::MeshCellsStore::corners_begin index_t corners_begin(index_t c) const ``` -------------------------------- ### Initialize OpenGL Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Initializes the OpenGL context and any associated GLUP objects required for rendering. ```cpp void GL_initialize () override ``` -------------------------------- ### Get Max Node Index (BalancedKdTree) Source: https://brunolevy.github.io/geogram/kd__tree_8h_source Returns the maximum node index within a subtree defined by a range [b, e] starting from node_id. ```cpp static index_t max_node_index(index_t node_id, index_t b, index_t e) Returns the maximum node index in subtree. **Definition** kd_tree.h:468 ``` -------------------------------- ### Draw Scene Begin Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Initializes OpenGL state for rendering the scene. This is typically called before any scene drawing commands. ```cpp virtual void draw_scene_begin () ``` -------------------------------- ### C++ GEO::MeshSurfaceIntersection::Halfedges::facet_alpha3 Source: https://brunolevy.github.io/geogram/mesh__surface__intersection_8h_source Gets the volumetric neighbor of a facet. This function provides information about volumetric connectivity starting from a facet. ```cpp index_t facet_alpha3(index_t f) const ``` -------------------------------- ### Setup Primitives (C++) Source: https://brunolevy.github.io/geogram/GLUP__context_8h_source A general function to set up rendering configurations for various primitive types. It likely calls specific setup functions for each primitive. ```cpp virtual void setup_primitives(); ``` -------------------------------- ### Constructor: SimpleApplication Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Initializes a new instance of the SimpleApplication class with a specified name. ```APIDOC ## Constructor: SimpleApplication() Initializes a new instance of the `GEO::SimpleApplication` class. ### Parameters - **name** (const std::string&): The name of the application. ``` -------------------------------- ### Get Elapsed Time (C++) Source: https://brunolevy.github.io/geogram/stopwatch_8h_source Returns the time elapsed since the Stopwatch object was created or reset. This method calculates the difference between the current time and the start time. ```c++ double GEO::Stopwatch::elapsed_time() const { // Calculates and returns the difference between current time and start_. // Requires implementation using std::chrono::system_clock. return 0.0; // Placeholder for actual implementation } ``` -------------------------------- ### Get Process Elapsed Time (C++) Source: https://brunolevy.github.io/geogram/stopwatch_8h_source A static method to retrieve the total elapsed time of the current process since its start. It relies on the internal `process_start_time_` and the `now()` method. ```c++ static double GEO::Stopwatch::process_elapsed_time() { return now() - process_start_time_; } ``` -------------------------------- ### Get Primitive Pseudo File - Geogram GLUP Source: https://brunolevy.github.io/geogram/functions_func_g Retrieves a pseudo-file containing primitive definitions for GLUP, likely used in shader development or rendering setup. ```cpp GLUP::Context::get_primitive_pseudo_file() ``` -------------------------------- ### System and Matrix Setup API Source: https://brunolevy.github.io/geogram/nl_8h This section covers the API for initiating and finalizing system or matrix creation, setting row lengths, adding coefficients, and managing the right-hand side. ```APIDOC ## Begin/End and Matrix Construction ### Description APIs for managing the creation and finalization of linear systems and matrices, including setting row lengths, coefficients, and right-hand side values. ### API Endpoints #### `nlBegin` **Description:** Begins the definition of a new primitive (system, matrix, or row). **Method:** void NLAPIENTRY nlBegin (NLenum primitive) **Parameters:** * `primitive` (NLenum): The type of primitive to begin (e.g., `NL_SYSTEM`, `NL_MATRIX`, `NL_ROW`). #### `nlEnd` **Description:** Finalizes the definition of the current primitive. **Method:** void NLAPIENTRY nlEnd (NLenum primitive) **Parameters:** * `primitive` (NLenum): The type of primitive to end. #### `nlSetRowLength` **Description:** Specifies the number of non-zero elements in the current row of the matrix. **Method:** void NLAPIENTRY nlSetRowLength (NLuint i, NLuint n) **Parameters:** * `i` (NLuint): The row index. * `n` (NLuint): The number of elements in the row. #### `nlCoefficient` **Description:** Appends a coefficient to the current row being defined. **Method:** void NLAPIENTRY nlCoefficient (NLuint i, NLdouble value) **Parameters:** * `i` (NLuint): The column index of the coefficient. * `value` (NLdouble): The value of the coefficient. #### `nlAddIJCoefficient` **Description:** Adds a coefficient to the matrix at the specified row and column, returning its index. **Method:** NLulong NLAPIENTRY nlAddIJCoefficient (NLuint i, NLuint j, NLdouble value) **Parameters:** * `i` (NLuint): The row index. * `j` (NLuint): The column index. * `value` (NLdouble): The value of the coefficient. #### `nlAddIJCoefficientAt` **Description:** Adds a coefficient to the matrix at a specific row, column, and index. **Method:** void NLAPIENTRY nlAddIJCoefficientAt (NLuint i, NLuint j, NLdouble value, NLulong index) **Parameters:** * `i` (NLuint): The row index. * `j` (NLuint): The column index. * `value` (NLdouble): The value of the coefficient. * `index` (NLulong): The index at which to add the coefficient. #### `nlAddIRightHandSide` **Description:** Adds a value to a component of the right-hand side vector. **Method:** void NLAPIENTRY nlAddIRightHandSide (NLuint i, NLdouble value) **Parameters:** * `i` (NLuint): The index of the component. * `value` (NLdouble): The value to add. #### `nlMultiAddIRightHandSide` **Description:** Adds a value to a component of the right-hand side vector for multiple systems. **Method:** void NLAPIENTRY nlMultiAddIRightHandSide (NLuint i, NLuint k, NLdouble value) **Parameters:** * `i` (NLuint): The index of the component. * `k` (NLuint): The system index. * `value` (NLdouble): The value to add. #### `nlRightHandSide` **Description:** Sets the right-hand side value for the current row. **Method:** void NLAPIENTRY nlRightHandSide (NLdouble value) **Parameters:** * `value` (NLdouble): The right-hand side value. #### `nlMultiRightHandSide` **Description:** Sets the right-hand side value for the current row across multiple systems. **Method:** void NLAPIENTRY nlMultiRightHandSide (NLuint k, NLdouble value) **Parameters:** * `k` (NLuint): The system index. * `value` (NLdouble): The right-hand side value. #### `nlRowScaling` **Description:** Sets the row scaling factor for the next row. **Method:** void NLAPIENTRY nlRowScaling (NLdouble value) **Parameters:** * `value` (NLdouble): The scaling factor. ### Constants * `NL_SYSTEM` (0x0): For defining a linear system. * `NL_MATRIX` (0x1): For defining a matrix. * `NL_ROW` (0x2): For defining a row. * `NL_MATRIX_PATTERN` (0x3): For defining a matrix pattern. ``` -------------------------------- ### Get Nearest Facet Hint Source: https://brunolevy.github.io/geogram/mesh__AABB_8h_source Computes a reasonable initialization for nearest facet search. This function helps in starting the search for the closest facet to a given point. ```c++ void get_nearest_facet_hint(const vec3 &p, index_t &nearest_facet, vec3 &nearest_point, double &sq_dist) const ``` -------------------------------- ### OpenGL and Initialization/Termination Source: https://brunolevy.github.io/geogram/simple__mesh__application_8h_source Methods for handling OpenGL initialization and termination, as well as the main geogram initialization process. These are crucial for setting up the rendering context and application environment. ```cpp void GL_initialize() override; void GL_terminate() override; void geogram_initialize(int argc, char** argv) override; ``` -------------------------------- ### Geogram Application Name and Start/Stop Functions Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Functions to get the application's name and control its main event loop. The start function initializes the loop, and stop terminates it. ```cpp const std::string & name() const virtual void start(int argc=0, char **argv=nullptr) virtual void stop() ``` -------------------------------- ### GLUP::Context::setup_GLUP_POINTS Source: https://brunolevy.github.io/geogram/GLUP__context_8h_source Setups GLSL programs for points. ```APIDOC ## GLUP::Context::setup_GLUP_POINTS ### Description Setups GLSL programs for points. ### Method void ### Endpoint GLUP::Context::setup_GLUP_POINTS() ### Parameters None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### Get Number of Vertices per Cell (C++) Source: https://brunolevy.github.io/geogram/delaunay_8h_source Returns the number of vertices that form each cell in the triangulation. For example, in a 3D Delaunay triangulation, this would typically be 4 for tetrahedra. ```cpp index_t cell_size() const ``` -------------------------------- ### Get Geometry Shader Preamble Pseudo-File (C++) Source: https://brunolevy.github.io/geogram/classGLUP_1_1Context Retrieves the content of the virtual file GLUP/current_profile/geometry_shader_preamble.h and appends it to the provided vector of GLSL::Source objects. This is used for geometry shader setup. ```cpp virtual void GLUP::Context::get_geometry_shader_preamble_pseudo_file( std::vector< GLSL::Source > & _sources_) ``` -------------------------------- ### Show Console Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Displays the application's console window. ```APIDOC ## POST /show_console ### Description Shows the console window for the application. ### Method POST ### Endpoint /show_console ### Parameters None ### Request Example None ### Response #### Success Response (200) Void return type. #### Response Example None ``` -------------------------------- ### Get successor of an edge constraint iterator in CDT Source: https://brunolevy.github.io/geogram/CDT__2d_8h_source Retrieves the next edge constraint in a sequence, starting from a given constraint iterator. This is used for traversing constrained edges. ```C++ index_t edge_cnstr_next(index_t ecit) const ``` -------------------------------- ### Context Setup and Support Functions Source: https://brunolevy.github.io/geogram/classGLUP_1_1Context Functions for initializing the context, checking primitive support, and obtaining context-specific information. ```C++ virtual const char * profile_name () const =0 | Gets the profile name associated with this context. virtual bool primitive_supports_array_mode (GLUPprimitive prim) const | Tests whether a given GLUP primitive supports array mode. virtual void setup () | Creates the uniform state and GLSL programs. virtual void bind_uniform_state (GLuint program) | Binds GLUP uniform state to a program. ``` -------------------------------- ### Setup Immediate Rendering Buffers Source: https://brunolevy.github.io/geogram/classGLUP_1_1Context Sets up the necessary buffers for immediate rendering operations. ```C++ virtual void setup_immediate_buffers () ``` -------------------------------- ### Get Halfedges for a Polyline in C++ Source: https://brunolevy.github.io/geogram/mesh__surface__intersection__internal_8h_source Retrieves a range of halfedge indices belonging to a specific polyline. It uses the 'polyline_start_' vector to determine the start and end points of the relevant section in the 'H_' vector. ```cpp const_index_ptr_range halfedges(index_t polyline) const { geo_debug_assert(polyline < nb()); return const_index_ptr_range( H_, polyline_start_[polyline], polyline_start_[polyline+1] ); } ``` -------------------------------- ### GEO::Application Initialization and Setup Source: https://brunolevy.github.io/geogram/classGEO_1_1Application-members Methods related to initializing and setting up the GEO application, including argument parsing and GL context. ```C++ void geogram_initialize(int argc, char **argv); void GL_initialize(); void ImGui_initialize(); void ImGui_load_fonts(); void declare_args(); void start(int argc = 0, char **argv = nullptr); ``` -------------------------------- ### C++ Get Halfedge Vertex From Source: https://brunolevy.github.io/geogram/mesh__halfedges_8h_source Retrieves the starting vertex (point) of a given half-edge from the mesh. It uses the facet and corner information of the half-edge to access the correct point in the mesh's facet corner store. ```cpp inline const vec3& halfedge_vertex_from( const Mesh& M, const MeshHalfedges::Halfedge& H ) { return M.facet_corners.point(H.corner); } ``` -------------------------------- ### Initialize Colormap from XPM Data Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Initializes a new colormap with a given name and XPM data. ```cpp void init_colormap (const std::string &name, const char **xpm_data) ``` -------------------------------- ### SimpleApplication Constructor Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication The constructor for the SimpleApplication class, which initializes the application with a given name. ```cpp GEO::SimpleApplication::SimpleApplication( const std::string & _name_ ); ``` -------------------------------- ### KdTree: root() - Get the Root Node Index Source: https://brunolevy.github.io/geogram/classGEO_1_1KdTree This inline virtual function returns the index of the root node of the KdTree. It's a common utility function for starting tree traversals or accessing the top-level structure of the tree. ```C++ inline index_t GEO::KdTree::root() const ``` -------------------------------- ### Getting Vertex-to-Facet Mapping (C++) Source: https://brunolevy.github.io/geogram/geogram_2delaunay_2cavity_8h_source Retrieves the facet index associated with a pair of vertices (`v1`, `v2`) from the hash table. It performs a linear probe starting from the computed hash index until the correct entry is found or the list wraps around. ```C++ local_index_t get_vv2t(index_t v1, index_t v2) const { #ifndef GARGANTUA Numeric::uint64 K = (Numeric::uint64(v1+1) << 32) | Numeric::uint64(v2+1); #endif CAVITY_STATS(index_t cnt = 0;) index_t h = hash(v1,v2); index_t cur = h; do { ``` -------------------------------- ### File Navigation and Loading Source: https://brunolevy.github.io/geogram/simple__mesh__application_8h_source Handles loading and navigating through files. Includes functions to load the first, next, previous, or last file in a directory, as well as loading a specific file by name. ```C++ static void first_file() Loads the first file in the current directory. static void next_file() Loads the next file. static void prev_file() Loads the previous file. static void last_file() Loads the last file in the current directory. bool load(const std::string &filename) Loads a file. ``` -------------------------------- ### Get Conflict List - C++ Source: https://brunolevy.github.io/geogram/classGEOGen_1_1ConvexCell Determines the conflict zone, which is the set of triangles with dual vertices on the negative side of a bisector. It requires the mesh, Delaunay triangulation, bisector extremities, and a flag for exact predicates. Outputs the start and end indices of the conflict list. ```cpp template inline void GEOGen::ConvexCell::get_conflict_list(const Mesh * _mesh_, const Delaunay * _delaunay_, index_t _i_, index_t _j_, bool _exact_, index_t & _conflict_begin_, index_t & _conflict_end_) ``` -------------------------------- ### Initialize ImGui Library Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Protected virtual function to initialize the ImGui library for immediate mode graphical user interfaces. It is reimplemented from GEO::Application. ```C++ virtual void GEO::SimpleApplication::ImGui_initialize() ``` -------------------------------- ### Get Dimension Source: https://brunolevy.github.io/geogram/classGEO_1_1CentroidalVoronoiTesselation Gets the dimension of the points. ```APIDOC ## GET /dimension ### Description Gets the dimension of the points. ### Method GET ### Endpoint /dimension ### Parameters None ### Request Example None ### Response #### Success Response (200) - **dimension** (coord_index_t) - The dimension of the points. #### Response Example ```json { "dimension": 3 } ``` ``` -------------------------------- ### Initialize Geogram and Core Features Source: https://brunolevy.github.io/geogram/simple__application_8h_source Initializes the Geogram library with command-line arguments and sets up default colormaps. It also includes a function to hide the console window. ```cpp void geogram_initialize(int argc, char **argv) void init_colormaps() void hide_console() ``` -------------------------------- ### Get R3 Embedding Source: https://brunolevy.github.io/geogram/classGEO_1_1CentroidalVoronoiTesselation Gets the representation of a point in R3. ```APIDOC ## GET /R3_embedding ### Description Gets the representation of a point in R3. ### Method GET ### Endpoint /R3_embedding ### Parameters #### Path Parameters - **p** (index_t) - Required - The index of the point. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **R3_embedding** (vec3 &) - The R3 embedding of the specified point. #### Response Example ```json { "R3_embedding": [1.0, 2.0, 3.0] } ``` ``` -------------------------------- ### GLUP::Context::setup_primitives Source: https://brunolevy.github.io/geogram/GLUP__context_8h_source Sets up the OpenGL programs and Vertex Array Objects (VAOs) used for each primitive type. ```APIDOC ## GLUP::Context::setup_primitives ### Description Sets up the OpenGL programs and Vertex Array Objects (VAOs) used for each primitive type. ### Method `virtual void` ### Endpoint N/A (Method within a class) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None (Method call) ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### Get Number of Points Source: https://brunolevy.github.io/geogram/classGEO_1_1CentroidalVoronoiTesselation Gets the number of points to be optimized. ```APIDOC ## GET /nb_points ### Description Gets the number of points to be optimized. ### Method GET ### Endpoint /nb_points ### Parameters None ### Request Example None ### Response #### Success Response (200) - **nb_points** (index_t) - The number of points. #### Response Example ```json { "nb_points": 1000 } ``` ``` -------------------------------- ### Initialize and Terminate OpenGL/GLUP Source: https://brunolevy.github.io/geogram/simple__mesh__application_8h_source Provides methods to initialize and deallocate OpenGL and GLUP objects for graphics rendering. These are essential setup and cleanup steps for the graphics pipeline. ```C++ void GL_initialize() override Initializes OpenGL and GLUP objects. void GL_terminate() override Deallocates OpenGL and GLUP objects. ``` -------------------------------- ### C++: Scene Drawing Setup Source: https://brunolevy.github.io/geogram/simple__application_8h_source Sets up OpenGL for scene drawing at the beginning of the drawing process. This is a virtual function intended for customization. ```cpp virtual void draw_scene_begin(); ``` -------------------------------- ### AttributesManager - Get and Set Operations Source: https://brunolevy.github.io/geogram/classGEO_1_1AttributesManager Provides methods to get the number of attributes, list their names, and get the size and capacity of the manager. These are essential for querying the state of the AttributesManager. ```cpp index_t nb () const void list_attribute_names (vector< std::string > &names) const index_t size () const index_t capacity () const ``` -------------------------------- ### Get Intensity Source: https://brunolevy.github.io/geogram/classGEO_1_1UnsharpMaskingImpl Gets the intensity setting. ```APIDOC ## get_intensity() ### Description Gets the intensity. ### Method index_t ### Endpoint inline ### Parameters None ### Request Example None ### Response - **intensity** (index_t) - The intensity, as an integer. A value of 50 (default) corresponds to average intensity. ``` -------------------------------- ### Draw Console Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Draws the console output and input interface. ```cpp virtual void draw_console () ``` -------------------------------- ### Initialize FileSystem Source: https://brunolevy.github.io/geogram/namespaceGEO_1_1FileSystem Initializes the FileSystem library. This is typically called automatically during startup. ```APIDOC ## POST /filesystem/initialize ### Description Initializes the FileSystem library. This function is automatically called during Geogram startup and should not be called by client code. ### Method POST ### Endpoint /filesystem/initialize ### Response #### Success Response (200) - **status** (string) - Indicates the initialization status. #### Response Example ```json { "status": "initialized" } ``` ``` -------------------------------- ### Get Contrast Source: https://brunolevy.github.io/geogram/classGEO_1_1UnsharpMaskingImpl Gets the contrast setting. ```APIDOC ## get_contrast() ### Description Gets the contrast. ### Method index_t ### Endpoint inline ### Parameters None ### Request Example None ### Response - **contrast** (index_t) - The contrast, as an integer. A value of 50 (default) corresponds to average contrast. ``` -------------------------------- ### MeshGfx - Get Time Source: https://brunolevy.github.io/geogram/mesh__gfx_8h_source Gets the current time of the animation. ```APIDOC ## double get_time ### Description Gets the time of the animation. ### Method double const ### Endpoint GEO::MeshGfx::get_time ### Parameters None ### Response #### Success Response (200) - Returns the current animation time. ``` -------------------------------- ### Draw Application Menus Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Draws all the menus associated with the application. ```cpp virtual void draw_application_menus () ``` -------------------------------- ### Constructor: Console Source: https://brunolevy.github.io/geogram/classGEO_1_1Console Initializes a new instance of the Console class, optionally linking it to an external visibility flag. ```APIDOC ## Console() ### Description Initializes a new instance of the Console class. ### Method CONSTRUCTOR ### Parameters - **visible_flag** (bool*) - Optional - An optional pointer to an application variable that controls the visibility of this Console. ### Example ```cpp // Create a console without an external visibility flag Console myConsole; // Create a console linked to a visibility flag bool isConsoleVisible = true; Console myVisibleConsole(&isConsoleVisible); ``` ``` -------------------------------- ### Get Neighbors Source: https://brunolevy.github.io/geogram/classGEO_1_1ParallelDelaunay3d Gets the one-ring neighbors of a given vertex. ```APIDOC ## Get Neighbors ### Description Gets the one-ring neighbors of vertex v. ### Method GET ### Endpoint /websites/brunolevy_github_io_geogram ### Parameters #### Query Parameters - **v** (index_t) - Required - The index of the vertex. - **neighbors** (vector< index_t > &) - Output - A vector to store the indices of the neighboring vertices. ``` -------------------------------- ### MeshGfx - Get Animate Source: https://brunolevy.github.io/geogram/mesh__gfx_8h_source Gets the current animation flag status. ```APIDOC ## bool get_animate ### Description Gets the animate flag. ### Method bool const ### Endpoint GEO::MeshGfx::get_animate ### Parameters None ### Response #### Success Response (200) - Returns true if animation is enabled, false otherwise. ``` -------------------------------- ### Browse Directory Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Recursively browses a specified directory and generates menu items based on its contents. Supports including subdirectories. ```cpp void browse (const std::string &path, bool subdirs=false) ``` -------------------------------- ### MeshGfx - Get Mesh Source: https://brunolevy.github.io/geogram/mesh__gfx_8h_source Gets a pointer to the currently set mesh. ```APIDOC ## const Mesh * mesh ### Description Gets the mesh. ### Method const Mesh * const ### Endpoint GEO::MeshGfx::mesh ### Parameters None ### Response #### Success Response (200) - Returns a const pointer to the currently set Mesh object. ``` -------------------------------- ### Initialize Default Colormaps Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Initializes all the predefined default colormaps for use in the application. ```cpp void init_colormaps () ``` -------------------------------- ### MeshGfx - Get Show Mesh Source: https://brunolevy.github.io/geogram/mesh__gfx_8h_source Gets the visibility flag for the mesh. ```APIDOC ## bool get_show_mesh ### Description Gets the mesh visibility flag. ### Method bool const ### Endpoint GEO::MeshGfx::get_show_mesh ### Parameters None ### Response #### Success Response (200) - Returns true if the mesh is visible, false otherwise. ``` -------------------------------- ### Saving and File Extensions Source: https://brunolevy.github.io/geogram/simple__mesh__application_8h_source Handles saving the current mesh state and querying supported file extensions for reading and writing. ```C++ bool save(const std::string &filename) Saves the current content to a file. std::string supported_write_file_extensions() override Gets the list of supported file extensions for writing. std::string supported_read_file_extensions() override Gets the list of supported file extensions for reading. ``` -------------------------------- ### MeshGfx - Get Lighting Source: https://brunolevy.github.io/geogram/mesh__gfx_8h_source Gets the current lighting flag status. ```APIDOC ## bool get_lighting ### Description Gets the lighing flag. ### Method bool const ### Endpoint GEO::MeshGfx::get_lighting ### Parameters None ### Response #### Success Response (200) - Returns true if lighting is enabled, false otherwise. ``` -------------------------------- ### MeshGfx - Get Surface Color Source: https://brunolevy.github.io/geogram/mesh__gfx_8h_source Gets the current surface color of the mesh. ```APIDOC ## void get_surface_color ### Description Gets the surface color. ### Method void const ### Endpoint GEO::MeshGfx::get_surface_color ### Parameters None ### Response #### Success Response (200) - **r** (float) - Red component of the surface color. - **g** (float) - Green component of the surface color. - **b** (float) - Blue component of the surface color. - **a** (float) - Alpha component of the surface color. ``` -------------------------------- ### GEO::Application::start() - Start Application Event Loop Source: https://brunolevy.github.io/geogram/classGEO_1_1Application Initiates the main event loop of the application. Optionally accepts command-line arguments for initialization. ```cpp virtual void GEO::Application::start(int _argc_ = 0, char ** _argv_ = nullptr) ``` -------------------------------- ### Image Library Initialization and Singleton Source: https://brunolevy.github.io/geogram/classGEO_1_1ImageLibrary-members Methods for initializing the ImageLibrary and accessing its singleton instance. ```APIDOC ## initialize /websites/brunolevy_github_io_geogram ### Description Initializes the ImageLibrary. This is a static method. ### Method `initialize` ### Endpoint N/A (C++ method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None (C++ method) #### Response Example None ## instance /websites/brunolevy_github_io_geogram ### Description Returns the singleton instance of the ImageLibrary. This is a static method. ### Method `instance` ### Endpoint N/A (C++ method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None (C++ method) #### Response Example None ## terminate /websites/brunolevy_github_io_geogram ### Description Terminates the ImageLibrary. This is a static method. ### Method `terminate` ### Endpoint N/A (C++ method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None (C++ method) #### Response Example None ``` -------------------------------- ### MeshGfx - Get Mesh Width Source: https://brunolevy.github.io/geogram/mesh__gfx_8h_source Gets the current width of the mesh rendering. ```APIDOC ## index_t get_mesh_width ### Description Gets the mesh width. ### Method index_t const ### Endpoint GEO::MeshGfx::get_mesh_width ### Parameters None ### Response #### Success Response (200) - Returns the current mesh width. ``` -------------------------------- ### SimpleMeshApplication Constructor and Instance Source: https://brunolevy.github.io/geogram/simple__mesh__application_8h_source Defines the constructor for SimpleMeshApplication and a static method to get the singleton instance of the application. It ensures that the application instance is correctly cast to SimpleMeshApplication. ```cpp class GEOGRAM_GFX_API SimpleMeshApplication : public SimpleApplication { public: SimpleMeshApplication(const std::string& name); static SimpleMeshApplication* instance() { SimpleMeshApplication* result = dynamic_cast( SimpleApplication::instance() ); geo_assert(result != nullptr); return result; } ... }; ``` -------------------------------- ### MeshGfx - Get Object Picking ID Source: https://brunolevy.github.io/geogram/mesh__gfx_8h_source Gets the object-wide picking ID. ```APIDOC ## index_t get_object_picking_id ### Description Gets the object-wide picking id. ### Method index_t const ### Endpoint GEO::MeshGfx::get_object_picking_id ### Parameters None ### Response #### Success Response (200) - Returns the object-wide picking ID. ``` -------------------------------- ### MeshGfx - Get Cells Color Source: https://brunolevy.github.io/geogram/mesh__gfx_8h_source Gets the current color of the cells in the mesh. ```APIDOC ## void get_cells_color ### Description Gets the cells color. ### Method void const ### Endpoint GEO::MeshGfx::get_cells_color ### Parameters None ### Response #### Success Response (200) - **r** (float) - Red component of the cell color. - **g** (float) - Green component of the cell color. - **b** (float) - Blue component of the cell color. - **a** (float) - Alpha component of the cell color. ``` -------------------------------- ### Set Default Layout Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Applies the default window layout configuration. ```cpp void set_default_layout () ``` -------------------------------- ### Setup GLSL Programs for Connectors Source: https://brunolevy.github.io/geogram/classGLUP_1_1Context Initializes the GLSL shader programs for rendering connector primitives. ```C++ virtual void setup_GLUP_CONNECTORS () ``` -------------------------------- ### Get Blur Width Source: https://brunolevy.github.io/geogram/classGEO_1_1UnsharpMaskingImpl Gets the size of the blurring kernel in pixels. ```APIDOC ## get_blur_width() ### Description Gets the size of the blurring kernel. ### Method index_t ### Endpoint inline ### Parameters None ### Request Example None ### Response - **blur_width** (index_t) - The size of the blurring kernel, in pixels. ``` -------------------------------- ### Initialize OpenGL Context Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Protected virtual function to initialize OpenGL and GLUP objects. It is reimplemented in GEO::SimpleMeshApplication. ```C++ virtual void GEO::SimpleApplication::GL_initialize() ``` -------------------------------- ### Get Array Capacity Source: https://brunolevy.github.io/geogram/classGEOGen_1_1FacetSeedMarking Gets the capacity of a specified array within the FacetSeedMarking. ```APIDOC ## GEOGen::FacetSeedMarking::array_capacity(index_t array) ### Description Gets the capacity of one of the arrays. ### Method GET ### Endpoint `/websites/brunolevy_github_io_geogram/array_capacity/{array}` ### Parameters #### Path Parameters - **array** (index_t) - Required - The index of the array to query. ### Response #### Success Response (200) - **capacity** (index_t) - The capacity of the specified array. ### Response Example ```json { "capacity": 128 } ``` ``` -------------------------------- ### Get Array Size Source: https://brunolevy.github.io/geogram/classGEOGen_1_1FacetSeedMarking Gets the size of a specified array within the FacetSeedMarking. ```APIDOC ## GEOGen::FacetSeedMarking::array_size(index_t array) ### Description Gets the size of one of the arrays. ### Method GET ### Endpoint `/websites/brunolevy_github_io_geogram/array_size/{array}` ### Parameters #### Path Parameters - **array** (index_t) - Required - The index of the array to query. ### Response #### Success Response (200) - **size** (index_t) - The size of the specified array. ### Response Example ```json { "size": 100 } ``` ``` -------------------------------- ### Draw Viewer Properties Window Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Draws the ImGui frame and contents for the viewer properties window. ```cpp virtual void draw_viewer_properties_window () ``` -------------------------------- ### Get Number of Arrays Source: https://brunolevy.github.io/geogram/classGEOGen_1_1FacetSeedMarking Gets the number of arrays used internally by the FacetSeedMarking. ```APIDOC ## GEOGen::FacetSeedMarking::nb_arrays() ### Description Gets the number of arrays used internally. ### Method GET ### Endpoint `/websites/brunolevy_github_io_geogram/nb_arrays` ### Response #### Success Response (200) - **nb_arrays** (index_t) - The number of internal arrays. ### Response Example ```json { "nb_arrays": 10 } ``` ``` -------------------------------- ### Browse Directory Functionality Source: https://brunolevy.github.io/geogram/classGEO_1_1SimpleApplication Recursively browses a directory and generates menu items. It takes the path to the directory and an optional boolean to include subdirectories. ```cpp void GEO::SimpleApplication::browse( const std::string & _path, bool _subdirs = false ); ```