Class AttributeMeshIOBase

Inheritance Relationships

Base Types

Derived Type

Class Documentation

class AttributeMeshIOBase : public lvr2::MeshGeometryIO, public lvr2::GroupedChannelIO

Subclassed by lvr2::hdf5features::MeshIO< Derived >

Public Functions

bool addMesh(const HalfEdgeMesh<BaseVec> &hem)

Adds a HalfEdgeMesh to the persistence layer.

Parameters:

hem – The HalrfEdgeMesh which has to be stored

Returns:

true if the HalfEdgeMesh has been written to the persistence layer, false otherwise

boost::optional<HalfEdgeMesh<BaseVec>> getMesh()

Reads a HalfEdgeMesh from the persistence layer.

Returns:

Returns an optional to a HalfEdgeMesh which is valid if the mesh has been read successfully

template<typename MapT, typename BaseVecT>
bool addDenseAttributeMap(const BaseMesh<BaseVecT> &mesh, const MapT &map, const std::string &name)

addDenseAttributeMap Stores a dense attribute map to the persistence layer where the attribute group is defined by the given map type.

Template Parameters:

MapT – The map type of the map which has to be stored

Parameters:
  • mesh – The mesh which correspond to the map

  • map – The map which has to be stored

  • name – The name under which the map should be stored

Returns:

true if the map has been stored successfully, false otherwise

template<typename MapT>
bool addDenseAttributeMap(const MapT &map, const std::string &name)

addDenseAttributeMap Stores a dense attribute map to the persistence layer where the attribute group is defined by the given map type.

Template Parameters:

MapT – The map type of the map which has to be stored

Parameters:
  • map – The map which has to be stored

  • name – The name under which the map should be stored

Returns:

true if the map has been stored successfully, false otherwise

template<typename MapT>
boost::optional<MapT> getDenseAttributeMap(const std::string &name)

getDenseAttributeMap Reads a dense attribute map from the persistence layer where the attribute group is defined by the given map type.

Template Parameters:

MapT – The map type of the map which has to be loaded

Parameters:
  • map – The map which has to be loaded

  • name – The name under which the map values can be found in the persistence layer

Returns:

A valid optional to the map if the map has been loaded successfully, a none type otherwise

template<typename MapT>
bool addAttributeMap(const MapT &map, const std::string &name)

addAttributeMap Stores a general attribute map to the persistence layer where the attribute group is defined by the given map type. Note, that the map keys are also stored, if you want to store a dense attribute map, please see addDenseAttributeMap.

Template Parameters:

MapT – The map type of the map which has to be stored

Parameters:
  • map – The map which has to be stored

  • name – The name under which the map should be stored

Returns:

true if the map has been stored successfully, false otherwise

template<typename MapT>
boost::optional<MapT> getAttributeMap(const std::string &name)

getAttributeMap Reads a general attribute map from the persistence layer where the attribute group is defined by the given map type. Note, that the map keys have to be available in the persistence layer. If you want to load a DenseAttributeMap, please use getDenseAttributeMap.

Template Parameters:

MapT – The map type of the map which has to be loaded

Parameters:
  • map – The map which has to be loaded

  • name – The name under which the map values can be found in the persistence layer

Returns:

A valid optional to the map if the map has been loaded successfully, a none type otherwise