cesium-native 0.67.0
Loading...
Searching...
No Matches
CesiumTilesetJsonWriter::SubtreeWriter Class Reference

Writes subtrees. More...

#include <CesiumTilesetJsonWriter/SubtreeWriter.h>

Public Member Functions

 SubtreeWriter ()
 Constructs a new instance.
 
CesiumJsonWriter::ExtensionWriterContext & getExtensions ()
 Gets the context used to control how subtree extensions are written.
 
const CesiumJsonWriter::ExtensionWriterContext & getExtensions () const
 Gets the context used to control how subtree extensions are written.
 
SubtreeWriterResult writeSubtreeJson (const CesiumTilesetJson::Subtree &subtree, const SubtreeWriterOptions &options=SubtreeWriterOptions()) const
 Serializes the provided subtree into a subtree JSON byte vector.
 
SubtreeWriterResult writeSubtreeBinary (const CesiumTilesetJson::Subtree &subtree, const std::span< const std::byte > &bufferData, const SubtreeWriterOptions &options=SubtreeWriterOptions()) const
 Serializes the provided subtree into a subtree binary byte vector.
 

Detailed Description

Writes subtrees.

Definition at line 52 of file SubtreeWriter.h.

Member Function Documentation

◆ writeSubtreeBinary()

SubtreeWriterResult CesiumTilesetJsonWriter::SubtreeWriter::writeSubtreeBinary ( const CesiumTilesetJson::Subtree & subtree,
const std::span< const std::byte > & bufferData,
const SubtreeWriterOptions & options = SubtreeWriterOptions() ) const

Serializes the provided subtree into a subtree binary byte vector.

The first buffer object implicitly refers to the subtree binary section and should not have a uri. Ignores internal data such as CesiumTilesetJson::BufferCesium.

Parameters
subtreeThe subtree.
bufferDataThe buffer data to store in the subtree binary section.
optionsOptions for how to write the subtree.
Returns
The result of writing the subtree.

◆ writeSubtreeJson()

SubtreeWriterResult CesiumTilesetJsonWriter::SubtreeWriter::writeSubtreeJson ( const CesiumTilesetJson::Subtree & subtree,
const SubtreeWriterOptions & options = SubtreeWriterOptions() ) const

Serializes the provided subtree into a subtree JSON byte vector.

Ignores internal data such as CesiumTilesetJson::BufferCesium when serializing the subtree. Internal data must be saved as external files. The buffer.uri field must be set accordingly prior to calling this function.

Parameters
subtreeThe subtree.
optionsOptions for how to write the subtree.
Returns
The result of writing the subtree.

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