cesium-native 0.48.0
Loading...
Searching...
No Matches
Cesium3DTilesWriter::SubtreeWriter Class Reference

Writes subtrees. More...

#include <Cesium3DTilesWriter/SubtreeWriter.h>

Public Member Functions

 SubtreeWriter ()
 Constructs a new instance.
 
CesiumJsonWriter::ExtensionWriterContextgetExtensions ()
 Gets the context used to control how subtree extensions are written.
 
const CesiumJsonWriter::ExtensionWriterContextgetExtensions () const
 Gets the context used to control how subtree extensions are written.
 
SubtreeWriterResult writeSubtreeJson (const Cesium3DTiles::Subtree &subtree, const SubtreeWriterOptions &options=SubtreeWriterOptions()) const
 Serializes the provided subtree into a subtree JSON byte vector.
 
SubtreeWriterResult writeSubtreeBinary (const Cesium3DTiles::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 51 of file SubtreeWriter.h.

Member Function Documentation

◆ writeSubtreeBinary()

SubtreeWriterResult Cesium3DTilesWriter::SubtreeWriter::writeSubtreeBinary ( const Cesium3DTiles::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 Cesium3DTiles::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 Cesium3DTilesWriter::SubtreeWriter::writeSubtreeJson ( const Cesium3DTiles::Subtree & subtree,
const SubtreeWriterOptions & options = SubtreeWriterOptions() ) const

Serializes the provided subtree into a subtree JSON byte vector.

Ignores internal data such as Cesium3DTiles::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: