coastline 0.0.4
Loading...
Searching...
No Matches
coastline::GltfDocument Struct Reference

A glTF or GLB document with buffers joined and buffer-view offsets adjusted. More...

#include <gltfdocument.h>

Collaboration diagram for coastline::GltfDocument:

Public Member Functions

std::expected< std::vector< std::uint8_t >, std::string > Image (std::size_t index) const

Public Attributes

std::filesystem::path path
nlohmann::ordered_json json
std::vector< std::uint8_t > buffer
 Decoded buffers in order, each starting on a 4-byte boundary.

Detailed Description

A glTF or GLB document with buffers joined and buffer-view offsets adjusted.

Member Function Documentation

◆ Image()

std::expected< std::vector< std::uint8_t >, std::string > coastline::GltfDocument::Image ( std::size_t index) const
Parameters
indexThe zero-based entry in the document's images array.
Returns
The encoded image from a URI or buffer view, or an error.

Member Data Documentation

◆ path

std::filesystem::path coastline::GltfDocument::path

The selected document, after .gltf precedence is resolved.

◆ json

nlohmann::ordered_json coastline::GltfDocument::json

The parsed document with consolidated buffer references.

◆ buffer

std::vector<std::uint8_t> coastline::GltfDocument::buffer

Decoded buffers in order, each starting on a 4-byte boundary.


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