Template Class MaterialIO

Class Documentation

template<typename BaseIO>
class MaterialIO

Public Functions

void saveMaterial(const std::string &mesh_name, const size_t &material_index, const MeshBufferPtr &mesh) const
void saveMaterials(const std::string &mesh_name, const MeshBufferPtr &mesh) const
std::pair<MaterialOptional, TextureVectorOpt> loadMaterial(const std::string &mesh_name, const size_t &material_index) const
size_t loadMaterials(const std::string &mesh_name, MeshBufferPtr mesh) const

Loads all Materials associated with mesh_name.

Parameters:
  • mesh_name – The name of the Mesh in the h5 file

  • mesh[out] The Materials and textures will be added to this mesh. mesh needs to have enough memory allocated to hold all textures

Returns:

The number of Materials loaded

Protected Attributes

BaseIO *m_baseIO = static_cast<BaseIO*>(this)
TextureIO<BaseIO> *m_textureIO = static_cast<TextureIO<BaseIO>*>(m_baseIO)