Geogram  Version 1.9.1
A programming library of geometric algorithms
GEO::MeshIOFlags Class Reference

Mesh load/save flags. More...

#include <geogram/mesh/mesh_io.h>

Public Member Functions

 MeshIOFlags ()
 Constructs a new MeshIOFlags with default attributes.
 
coord_index_t dimension () const
 Gets the dimension of the mesh (number of coordinates of the vertices). More...
 
void set_dimension (coord_index_t x)
 Sets the dimension of the mesh (number of coordinates of the vertices). More...
 
MeshAttributesFlags attributes () const
 Gets the attributes that should be loaded or saved. More...
 
void set_attributes (MeshAttributesFlags x)
 Sets the attributes that should be loaded or stored. More...
 
void set_attribute (MeshAttributesFlags x)
 Sets a mesh attribute. More...
 
void reset_attribute (MeshAttributesFlags &x)
 Resets a mesh attribute.. More...
 
bool has_attribute (MeshAttributesFlags x) const
 Tests whether a mesh attribute is set. More...
 
MeshElementsFlags elements () const
 Gets the set of mesh elements that should be loaded or stored. More...
 
void set_elements (MeshElementsFlags x)
 Sets the set of mesh elements that should be loaded or stored. More...
 
void set_element (MeshElementsFlags x)
 Sets a mesh element. More...
 
void reset_element (MeshElementsFlags x)
 Resets a mesh element. More...
 
bool has_element (MeshElementsFlags x) const
 Tests whether a mesh element is set. More...
 
void set_texture_filename (const std::string &x)
 Sets the name of the texture image file associated with this mesh. More...
 
const std::string & get_texture_filename () const
 Gets the name of the texture image file. More...
 
void set_verbose (bool x)
 Sets verbosity. More...
 
bool verbose () const
 Tests whether messages should be displayed. More...
 

Detailed Description

Mesh load/save flags.

Represents the optional attributes of a Mesh that can be loaded and stored in a file.

Definition at line 83 of file mesh_io.h.

Member Function Documentation

◆ attributes()

MeshAttributesFlags GEO::MeshIOFlags::attributes ( ) const
inline

Gets the attributes that should be loaded or saved.

Returns
a set of MeshAttributesFlags combined with bitwise or

Definition at line 113 of file mesh_io.h.

◆ dimension()

coord_index_t GEO::MeshIOFlags::dimension ( ) const
inline

Gets the dimension of the mesh (number of coordinates of the vertices).

Returns
the dimension of the mesh (i.e. number of coordinates of the verfices).

Definition at line 96 of file mesh_io.h.

◆ elements()

MeshElementsFlags GEO::MeshIOFlags::elements ( ) const
inline

Gets the set of mesh elements that should be loaded or stored.

Returns
a set of MeshElements combined with bitwise or

Definition at line 159 of file mesh_io.h.

◆ get_texture_filename()

const std::string& GEO::MeshIOFlags::get_texture_filename ( ) const
inline

Gets the name of the texture image file.

Returns
the name of the file.
See also
set_texture_filename()

Definition at line 219 of file mesh_io.h.

◆ has_attribute()

bool GEO::MeshIOFlags::has_attribute ( MeshAttributesFlags  x) const
inline

Tests whether a mesh attribute is set.

If set, this means that the mesh attribute x will be loaded or stored.

Parameters
[in]xthe attribute to test
Return values
trueif attribute x is se
falseotherwise

Definition at line 151 of file mesh_io.h.

◆ has_element()

bool GEO::MeshIOFlags::has_element ( MeshElementsFlags  x) const
inline

Tests whether a mesh element is set.

If set, this means that the mesh elements x will be loaded or stored.

Parameters
[in]xthe element to test
Return values
trueif element x is set
falseotherwise

Definition at line 199 of file mesh_io.h.

◆ reset_attribute()

void GEO::MeshIOFlags::reset_attribute ( MeshAttributesFlags x)
inline

Resets a mesh attribute..

Indicates that x should not be loaded nor stored.

Parameters
[in]xthe attribute that should be reset

Definition at line 139 of file mesh_io.h.

◆ reset_element()

void GEO::MeshIOFlags::reset_element ( MeshElementsFlags  x)
inline

Resets a mesh element.

Indicates that mesh elements x should not be loaded nor stored.

Parameters
[in]xthe element to reset

Definition at line 187 of file mesh_io.h.

◆ set_attribute()

void GEO::MeshIOFlags::set_attribute ( MeshAttributesFlags  x)
inline

Sets a mesh attribute.

Indicates that x should be loaded or stored.

Parameters
[in]xthe attribute that should be set

Definition at line 130 of file mesh_io.h.

◆ set_attributes()

void GEO::MeshIOFlags::set_attributes ( MeshAttributesFlags  x)
inline

Sets the attributes that should be loaded or stored.

Parameters
[in]xa set of MeshAttributes combined with bitwise or

Definition at line 121 of file mesh_io.h.

◆ set_dimension()

void GEO::MeshIOFlags::set_dimension ( coord_index_t  x)
inline

Sets the dimension of the mesh (number of coordinates of the vertices).

Parameters
[in]xthe dimension of the mesh

Definition at line 105 of file mesh_io.h.

◆ set_element()

void GEO::MeshIOFlags::set_element ( MeshElementsFlags  x)
inline

Sets a mesh element.

Indicates that mesh elements x should be loaded or stored.

Parameters
[in]xthe element to set

Definition at line 177 of file mesh_io.h.

◆ set_elements()

void GEO::MeshIOFlags::set_elements ( MeshElementsFlags  x)
inline

Sets the set of mesh elements that should be loaded or stored.

Parameters
[in]xa set of MeshElementsFlags combined with bitwise or

Definition at line 167 of file mesh_io.h.

◆ set_texture_filename()

void GEO::MeshIOFlags::set_texture_filename ( const std::string &  x)
inline

Sets the name of the texture image file associated with this mesh.

Used by the OBJ file format. If present generates a material lib.

Parameters
[in]xthe name of the file with the texture.

Definition at line 210 of file mesh_io.h.

◆ set_verbose()

void GEO::MeshIOFlags::set_verbose ( bool  x)
inline

Sets verbosity.

Error messages are always displayed, whatever the verbosity level.

Parameters
[in]xtrue if messages should be displayed, false otherwise. Default is true.

Definition at line 230 of file mesh_io.h.

◆ verbose()

bool GEO::MeshIOFlags::verbose ( ) const
inline

Tests whether messages should be displayed.

Error messages are always displayed, whatever the verbosity level.

Return values
trueif messages are displayed
falseotherwise
See also
set_verbose()

Definition at line 242 of file mesh_io.h.


The documentation for this class was generated from the following file: