| Graphite Version 3
    An experimental 3D geometry processing program | 
A wrapper to script low-level editing operations on a MeshGrob. More...
#include <OGF/mesh/interfaces/mesh_grob_editor_interface.h>
 
  
| Public Member Functions | |
| MeshGrobEditor () | |
| MeshGrobEditor constructor. | |
| ~MeshGrobEditor () override | |
| MeshGrobEditor destrutor. | |
| MeshGrob * | mesh_grob () const | 
| Gets the wrapped MeshGrob. | |
| index_t | get_dimension () const override | 
| Gets the dimension. | |
| index_t | get_nb_vertices () const | 
| Gets the number of vertices. | |
| index_t | get_nb_edges () const | 
| Gets the number of edges. | |
| index_t | get_nb_facets () const | 
| Gets the number of facets. | |
| index_t | get_nb_cells () const | 
| Gets the number of cells. | |
| NL::Vector * | create_attribute (const std::string &attribute_name, index_t dimension=1, MetaType *type=nullptr) | 
| Creates an attribute. | |
| NL::Vector * | find_or_create_attribute (const std::string &attribute_name, index_t dimension=1, MetaType *type=nullptr) | 
| Creates an attribute. | |
| bool | has_attribute (const std::string &attribute_name) const | 
| Tests whether the mesh has an attribute. | |
| NL::Vector * | get_points () | 
| Gets the points. | |
| NL::Vector * | get_triangles () const | 
| If the surface mesh is triangulated, gets the array of triangles. | |
| NL::Vector * | get_triangle_adjacents () const | 
| If the surface mesh is triangulated, gets the array of triangles. | |
| NL::Vector * | get_tetrahedra () const | 
| If the volume mesh is tetrahedralized, gets the array of tetrahedra. | |
| NL::Vector * | get_tetrahedra_adjacents () const | 
| If the volume mesh is tetrahedralized, gets the array of tetrahedra adjacencies. | |
| void | clear () | 
| clears this mesh. | |
| index_t | create_vertex (const vec3 &V=vec3(0.0, 0.0, 0.0)) | 
| Creates a new vertex. | |
| void | set_vertex (index_t v, const vec3 &V=vec3(0.0, 0.0, 0.0)) | 
| Sets the coordinates of an existing vertex. | |
| index_t | create_vertices (index_t nb) | 
| Creates multiple vertices. | |
| index_t | create_facet (index_t nb_vertices) | 
| Creates a facet. | |
| index_t | create_triangle (index_t v1, index_t v2, index_t v3) | 
| Creates a triangle. | |
| index_t | create_quad (index_t v1, index_t v2, index_t v3, index_t v4) | 
| Creates a quad. | |
| index_t | create_edge (index_t v1, index_t v2) | 
| Creates an edge. | |
| index_t | create_triangles (index_t nb_triangles) | 
| Creates triangles. | |
| index_t | create_quads (index_t nb_quads) | 
| Creates a chunk of quadrilateral facets. | |
| index_t | create_facets (index_t nb_facets, index_t nb_vertices_per_facet) | 
| Creates a chunk of facets. | |
| void | connect_facets () | 
| Computes facet adjacencies. | |
| index_t | facet_nb_vertices (index_t f) const | 
| Gets the number of vertices in a facet. | |
| index_t | facet_vertex (index_t f, index_t lv) const | 
| Gets a vertex in a facet. | |
| void | set_facet_vertex (index_t f, index_t lv, index_t v) | 
| Sets a vertex of the facet. | |
| void | delete_vertices (NL::Vector *to_delete) | 
| Deletes a set of vertices. | |
| void | delete_edges (NL::Vector *to_delete, bool delete_isolated_vertices=true) | 
| Deletes a set of edges. | |
| void | delete_facets (NL::Vector *to_delete, bool delete_isolated_vertices=true) | 
| Deletes a set of facets. | |
| void | delete_cells (NL::Vector *to_delete, bool delete_isolated_vertices=true) | 
| Deletes a set of cells. | |
|  Public Member Functions inherited from OGF::Interface | |
| Interface () | |
| Interface constructor. | |
| ~Interface () override | |
| Interface destructor. | |
| Grob * | grob () const | 
| Gets the Grob. | |
| SceneGraph * | scene_graph () const | 
| Gets the SceneGraph. | |
| Grob * | get_grob () const | 
| Gets the current Grob. | |
|  Public Member Functions inherited from OGF::Object | |
| Object (bool transient=false) | |
| Object constructor. | |
| ~Object () override | |
| Object destructor. | |
| virtual MetaClass * | meta_class () const | 
| Gets the meta class. | |
| virtual void | set_meta_class (MetaClass *mclass) | 
| Sets the meta class. | |
| unsigned int | id () const | 
| Gets the identifier of this object. | |
| std::string | string_id () const | 
| Gets the unique string identifier. | |
| bool | has_method (const std::string &method_name) const | 
| Tests whether a method is defined. | |
| virtual bool | invoke_method (const std::string &method_name, const ArgList &args, Any &ret_val) | 
| Invokes a method by method name and argument list, and gets the return value. | |
| bool | invoke_method (const std::string &method_name, const ArgList &args) | 
| Invokes a method by method name and argument list. | |
| bool | invoke_method (const std::string &method_name) | 
| Invokes a method by method name. | |
| bool | has_property (const std::string &prop_name) const | 
| Tests whether a property is defined. | |
| virtual bool | get_property (const std::string &prop_name, std::string &prop_value) const | 
| Gets a property. | |
| virtual Connection * | connect_signal_to_slot (const std::string &signal_name, Object *to, const std::string &slot_name) | 
| Connects a signal with a slot of another object. | |
| virtual void | add_connection (Connection *connection) | 
| Adds a connection to this object. | |
| virtual void | remove_connection (Connection *connection) | 
| Removes a connection to this object. | |
| virtual void | get_element (index_t i, Any &value) const | 
| Gets an element by index. | |
| virtual void | set_element (index_t i, const Any &value) | 
| Sets an element by index. | |
| void | get_element (index_t item, index_t component, Any &value) const | 
| Gets an element by item and component. | |
| void | set_element (index_t item, index_t component, const Any &value) | 
| Sets an element by item and component. | |
| virtual void | search (const std::string &needle, const std::string &path="") | 
| Displays the names of all objects that contain a substring. | |
| bool | get_signals_enabled () const | 
| Tests wheter signals are enabled. | |
| void | set_signals_enabled (bool value) | 
| Enables or disables signals. | |
| bool | get_slots_enabled () const | 
| Tests wheter slots are enabled. | |
| void | set_slots_enabled (bool value) | 
| Enables or disables slots. | |
| MetaClass * | get_meta_class () const | 
| Gets the meta class. | |
| std::string | get_string_id () const | 
| Gets the unique string identifier. | |
| virtual std::string | get_doc () const | 
| Gets the documentation. | |
| virtual Sign | compare (const Object *other) const | 
| Compares this object with another one. | |
| virtual bool | is_a (const MetaType *type) const | 
| Tests whether this object inherits a given type. | |
| void | disconnect () | 
| Removes all connections from signals of this objects. | |
| void | enable_signals () | 
| Enables signals. | |
| void | disable_signals () | 
| Disables signals. | |
| void | enable_slots () | 
| Enables slots. | |
| void | disable_slots () | 
| Disables slots. | |
| void | set_properties (const ArgList &args) | 
| Sets several properties in a single call. | |
| virtual bool | set_property (const std::string &name, const std::string &value) | 
| Sets an individual property. | |
| void | help () const | 
| Displays some help about this object. | |
| virtual bool | set_property (const std::string &name, const Any &value) | 
| Sets an individual property. | |
| virtual bool | get_property (const std::string &prop_name, Any &prop_value) const | 
| Gets a property. | |
|  Public Member Functions inherited from GEO::Counted | |
| void | ref () const | 
| Increments the reference count. | |
| void | unref () const | 
| Decrements the reference count. | |
| bool | is_shared () const | 
| Check if the object is shared. | |
| int | nb_refs () const | 
| Gets the number of references that point to this object. | |
| Public Attributes | |
| : void set_dimension(index_t dim) | |
| : NL::Vector* find_attribute( const std::string& attribute_name | |
| bool | quiet | 
|  Public Attributes inherited from OGF::Interface | |
| : virtual void set_grob(Grob* value) | |
|  Public Attributes inherited from OGF::Object | |
| : virtual index_t get_nb_elements() const | |
| : bool equals(const Object* other) const | |
| Protected Member Functions | |
| bool | check_mesh_grob () const | 
| Checks whether MeshGrob is valid. | |
| bool | check_vertex_index (index_t v) const | 
| Checks whether a vertex index is valid. | |
| bool | check_facet_index (index_t f) const | 
| Checks whether a facet index is valid. | |
| void | update () | 
| Redisplays the wrapped MeshGrob. | |
|  Protected Member Functions inherited from OGF::Object | |
| virtual bool | emit_signal (const std::string &signal_name, const ArgList &args, bool called_from_slot=false) | 
| Emits a signal and calls the slots it is connected to. | |
|  Protected Member Functions inherited from GEO::Counted | |
| Counted () | |
| Creates a reference counted object. | |
| virtual | ~Counted () | 
| Destroys a reference counted object. | |
| Additional Inherited Members | |
|  Static Public Member Functions inherited from OGF::Object | |
| static Object * | id_to_object (unsigned int id) | 
| Gets an object from a unique object id. | |
|  Static Public Member Functions inherited from GEO::Counted | |
| static void | ref (const Counted *counted) | 
| Increments the reference count. | |
| static void | unref (const Counted *counted) | 
| Decrements the reference count. | |
A wrapper to script low-level editing operations on a MeshGrob.
Definition at line 56 of file mesh_grob_editor_interface.h.
| 
 | protected | 
Checks whether a facet index is valid.
Displays an error message if not.
| true | if facet index is valid. | 
| false | otherwise. | 
| 
 | protected | 
| 
 | protected | 
Checks whether a vertex index is valid.
Displays an error message if not.
| true | if vertex index is valid. | 
| false | otherwise. | 
| NL::Vector * OGF::MeshGrobEditor::create_attribute | ( | const std::string & | attribute_name, | 
| index_t | dimension = 1, | ||
| MetaType * | type = nullptr | ||
| ) | 
Creates an attribute.
| [in] | attribute_name | the name of the attribute, preceded by the elements (e.g., "vertices.attr_name", "edges.attr_name" etc...). | 
| [in] | dimension | number of elements per item. Default is 1. | 
| [in] | type | optional meta type for the attribute elements. Default is double precision number. | 
Creates an edge.
| [in] | v1,v2 | the two extremities of the edge, in 0..nb_vertices()-1 | 
Creates a facet.
The vertices of the facet are left uninitialized.
| [in] | nb_vertices | number of vertices in facet. | 
Creates a chunk of facets.
The facet vertices are uninitialized.
| [in] | nb_facets | the number of facets to create. | 
| [in] | nb_vertices_per_facet | number of vertices in each facet. | 
Creates a quad.
| [in] | v1,v2,v3,v4 | the indices of the vertices, in 0..nb_vertices()-1 | 
Creates a chunk of quadrilateral facets.
The facet vertices are uninitialized.
| [in] | nb_quads | the number of quads to create. | 
Creates a triangle.
| [in] | v1,v2,v3 | the indices of the vertices, in 0..nb_vertices()-1 | 
Creates triangles.
The facet vertices are uninitialized.
| [in] | nb_triangles | the number of triangles to create. | 
Creates a new vertex.
If this is a 2D mesh, z is ignored. 
| [in] | V | a vec3 with the coordinates of the vertex. | 
Creates multiple vertices.
| [in] | nb | the number of vertices to create. | 
| void OGF::MeshGrobEditor::delete_cells | ( | NL::Vector * | to_delete, | 
| bool | delete_isolated_vertices = true | ||
| ) | 
Deletes a set of cells.
| [in] | to_delete | a vector of type unsigned int or index_t. | 
| [in] | delete_isolated_vertices | if set, all vertices that have no mesh element incident to them are deleted. | 
to_delete needs to have the same size as the number of cells in the mesh. A non-zero entry in to_delete means that the associated cell should be deleted.
| void OGF::MeshGrobEditor::delete_edges | ( | NL::Vector * | to_delete, | 
| bool | delete_isolated_vertices = true | ||
| ) | 
Deletes a set of edges.
| [in] | to_delete | a vector of type unsigned int or index_t. | 
| [in] | delete_isolated_vertices | if set, all vertices that have no mesh element incident to them are deleted. | 
to_delete needs to have the same size as the number of edges in the mesh. A non-zero entry in to_delete means that the associated edge should be deleted.
| void OGF::MeshGrobEditor::delete_facets | ( | NL::Vector * | to_delete, | 
| bool | delete_isolated_vertices = true | ||
| ) | 
Deletes a set of facets.
| [in] | delete_isolated_vertices | if set, all vertices that have no mesh element incident to them are deleted. | 
| [in] | to_delete | a vector of type unsigned int or index_t. | 
to_delete needs to have the same size as the number of facets in the mesh. A non-zero entry in to_delete means that the associated facet should be deleted.
| void OGF::MeshGrobEditor::delete_vertices | ( | NL::Vector * | to_delete | ) | 
Deletes a set of vertices.
| [in] | to_delete | a vector of type unsigned int or index_t. | 
to_delete needs to have the same size as the number of vertices in the mesh. A non-zero entry in to_delete means that the associated vertex should be deleted.
Gets the number of vertices in a facet.
| [in] | f | the index of the facet. | 
f. Gets a vertex in a facet.
| [in] | f | the facet index. | 
| [in] | lv | the local index of the vertex in the facet. | 
| NL::Vector * OGF::MeshGrobEditor::find_or_create_attribute | ( | const std::string & | attribute_name, | 
| index_t | dimension = 1, | ||
| MetaType * | type = nullptr | ||
| ) | 
Creates an attribute.
| [in] | attribute_name | the name of the attribute, preceded by the elements (e.g., "vertices.attr_name", "edges.attr_name" etc...). | 
| [in] | dimension | number of elements per item. Default is 1. | 
| [in] | type | optional meta type for the attribute elements. Default is double precision number. | 
| 
 | overridevirtual | 
Gets the dimension.
Reimplemented from OGF::Object.
| index_t OGF::MeshGrobEditor::get_nb_cells | ( | ) | const | 
Gets the number of cells.
| index_t OGF::MeshGrobEditor::get_nb_edges | ( | ) | const | 
Gets the number of edges.
| index_t OGF::MeshGrobEditor::get_nb_facets | ( | ) | const | 
Gets the number of facets.
| index_t OGF::MeshGrobEditor::get_nb_vertices | ( | ) | const | 
Gets the number of vertices.
| 
 | inline | 
Gets the points.
Definition at line 172 of file mesh_grob_editor_interface.h.
| NL::Vector * OGF::MeshGrobEditor::get_tetrahedra | ( | ) | const | 
If the volume mesh is tetrahedralized, gets the array of tetrahedra.
| NL::Vector * OGF::MeshGrobEditor::get_tetrahedra_adjacents | ( | ) | const | 
If the volume mesh is tetrahedralized, gets the array of tetrahedra adjacencies.
| NL::Vector * OGF::MeshGrobEditor::get_triangle_adjacents | ( | ) | const | 
If the surface mesh is triangulated, gets the array of triangles.
| NL::Vector * OGF::MeshGrobEditor::get_triangles | ( | ) | const | 
If the surface mesh is triangulated, gets the array of triangles.
| bool OGF::MeshGrobEditor::has_attribute | ( | const std::string & | attribute_name | ) | const | 
Tests whether the mesh has an attribute.
| [in] | attribute_name | the name of the attribute, preceded by the elements (e.g., "vertices.attr_name", "edges.attr_name" etc...). | 
| true | if the mesh has an attribute of the specified name. | 
| false | otherwise. | 
| 
 | inline | 
Gets the wrapped MeshGrob.
Definition at line 72 of file mesh_grob_editor_interface.h.
Sets a vertex of the facet.
| [in] | f | the facet index. | 
| [in] | lv | the local index of the vertex in the facet. | 
| [in] | v | the global index of the vertex. | 
Sets the coordinates of an existing vertex.
If this is a 2D mesh, z is ignored. 
| [in] | v | the index of the vertex, in 0..nb_vertices()-1 | 
| [in] | V | a vec3 with the coordinates of the vertex. | 
| OGF::MeshGrobEditor::__pad0__ | 
Definition at line 72 of file mesh_grob_editor_interface.h.
| OGF::MeshGrobEditor::__pad1__ | 
Definition at line 112 of file mesh_grob_editor_interface.h.
| bool OGF::MeshGrobEditor::quiet | 
Definition at line 126 of file mesh_grob_editor_interface.h.