Class UnpackedDecoder
Defined in File libcacaoformats.hpp
Class Documentation
-
class UnpackedDecoder
Decoder for unpacked file formats.
Public Functions
-
std::array<libcacaoimage::Image, 6> DecodeCubemap(std::istream &data, std::function<std::unique_ptr<std::istream>(const std::string&)> loader)
Extract and decode the images in a cubemap.
- Parameters:
data – A stream to load cubemap YAML data from
loader – A function to get streams from names referenced in the main cubemap file. Set the “badbit” flag on the stream before returning to indicate a failed load.
- Throws:
std::runtime_error – If the data does not represent a valid cubemap or the provided IO callback fails to load faces
- Returns:
Decoded cubemap faces in the order of +X face, -X face, +Y face, -Y face, +Z face, -Z face
-
std::array<libcacaoimage::Image, 6> DecodeCubemap(std::istream &data, std::function<std::unique_ptr<std::istream>(const std::string&)> loader)