初始提交: UE5.3项目基础框架

This commit is contained in:
2025-10-14 11:14:54 +08:00
commit 721d9fd98e
5334 changed files with 316782 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#pragma once
/**
* @brief Classes for writing [3D Tiles](https://github.com/CesiumGS/3d-tiles).
*
* @mermaid-interactive{dependencies/Cesium3DTilesWriter}
*/
namespace Cesium3DTilesWriter {}
#if defined(_WIN32) && defined(CESIUM_SHARED)
#ifdef CESIUM3DTILESWRITER_BUILDING
#define CESIUM3DTILESWRITER_API __declspec(dllexport)
#else
#define CESIUM3DTILESWRITER_API __declspec(dllimport)
#endif
#else
#define CESIUM3DTILESWRITER_API
#endif

View File

@ -0,0 +1,81 @@
#pragma once
#include "Cesium3DTilesWriter/Library.h"
#include <CesiumJsonWriter/ExtensionWriterContext.h>
// forward declarations
namespace Cesium3DTiles {
struct Schema;
}
namespace Cesium3DTilesWriter {
/**
* @brief The result of writing a schema with
* {@link SchemaWriter::writeSchema}.
*/
struct CESIUM3DTILESWRITER_API SchemaWriterResult {
/**
* @brief The final generated std::vector<std::byte> of the schema JSON.
*/
std::vector<std::byte> schemaBytes;
/**
* @brief Errors, if any, that occurred during the write process.
*/
std::vector<std::string> errors;
/**
* @brief Warnings, if any, that occurred during the write process.
*/
std::vector<std::string> warnings;
};
/**
* @brief Options for how to write a schema.
*/
struct CESIUM3DTILESWRITER_API SchemaWriterOptions {
/**
* @brief If the schema JSON should be pretty printed.
*/
bool prettyPrint = false;
};
/**
* @brief Writes schemas.
*/
class CESIUM3DTILESWRITER_API SchemaWriter {
public:
/**
* @brief Constructs a new instance.
*/
SchemaWriter();
/**
* @brief Gets the context used to control how schema extensions are written.
*/
CesiumJsonWriter::ExtensionWriterContext& getExtensions();
/**
* @brief Gets the context used to control how schema extensions are written.
*/
const CesiumJsonWriter::ExtensionWriterContext& getExtensions() const;
/**
* @brief Serializes the provided schema object into a byte vector using the
* provided flags to convert.
*
* @param schema The schema.
* @param options Options for how to write the schema.
* @return The result of writing the schema.
*/
SchemaWriterResult writeSchema(
const Cesium3DTiles::Schema& schema,
const SchemaWriterOptions& options = SchemaWriterOptions()) const;
private:
CesiumJsonWriter::ExtensionWriterContext _context;
};
} // namespace Cesium3DTilesWriter

View File

@ -0,0 +1,81 @@
#pragma once
#include "Cesium3DTilesWriter/Library.h"
#include <CesiumJsonWriter/ExtensionWriterContext.h>
// forward declarations
namespace Cesium3DTiles {
struct Subtree;
}
namespace Cesium3DTilesWriter {
/**
* @brief The result of writing a subtree with
* {@link SubtreeWriter::writeSubtree}.
*/
struct CESIUM3DTILESWRITER_API SubtreeWriterResult {
/**
* @brief The final generated std::vector<std::byte> of the subtree JSON.
*/
std::vector<std::byte> subtreeBytes;
/**
* @brief Errors, if any, that occurred during the write process.
*/
std::vector<std::string> errors;
/**
* @brief Warnings, if any, that occurred during the write process.
*/
std::vector<std::string> warnings;
};
/**
* @brief Options for how to write a subtree.
*/
struct CESIUM3DTILESWRITER_API SubtreeWriterOptions {
/**
* @brief If the subtree JSON should be pretty printed.
*/
bool prettyPrint = false;
};
/**
* @brief Writes subtrees.
*/
class CESIUM3DTILESWRITER_API SubtreeWriter {
public:
/**
* @brief Constructs a new instance.
*/
SubtreeWriter();
/**
* @brief Gets the context used to control how subtree extensions are written.
*/
CesiumJsonWriter::ExtensionWriterContext& getExtensions();
/**
* @brief Gets the context used to control how subtree extensions are written.
*/
const CesiumJsonWriter::ExtensionWriterContext& getExtensions() const;
/**
* @brief Serializes the provided subtree object into a byte vector using the
* provided flags to convert.
*
* @param subtree The subtree.
* @param options Options for how to write the subtree.
* @return The result of writing the subtree.
*/
SubtreeWriterResult writeSubtree(
const Cesium3DTiles::Subtree& subtree,
const SubtreeWriterOptions& options = SubtreeWriterOptions()) const;
private:
CesiumJsonWriter::ExtensionWriterContext _context;
};
} // namespace Cesium3DTilesWriter

View File

@ -0,0 +1,81 @@
#pragma once
#include "Cesium3DTilesWriter/Library.h"
#include <CesiumJsonWriter/ExtensionWriterContext.h>
// forward declarations
namespace Cesium3DTiles {
struct Tileset;
}
namespace Cesium3DTilesWriter {
/**
* @brief The result of writing a tileset with
* {@link TilesetWriter::writeTileset}.
*/
struct CESIUM3DTILESWRITER_API TilesetWriterResult {
/**
* @brief The final generated std::vector<std::byte> of the tileset.
*/
std::vector<std::byte> tilesetBytes;
/**
* @brief Errors, if any, that occurred during the write process.
*/
std::vector<std::string> errors;
/**
* @brief Warnings, if any, that occurred during the write process.
*/
std::vector<std::string> warnings;
};
/**
* @brief Options for how to write a tileset.
*/
struct CESIUM3DTILESWRITER_API TilesetWriterOptions {
/**
* @brief If the tileset JSON should be pretty printed.
*/
bool prettyPrint = false;
};
/**
* @brief Writes tilesets.
*/
class CESIUM3DTILESWRITER_API TilesetWriter {
public:
/**
* @brief Constructs a new instance.
*/
TilesetWriter();
/**
* @brief Gets the context used to control how tileset extensions are written.
*/
CesiumJsonWriter::ExtensionWriterContext& getExtensions();
/**
* @brief Gets the context used to control how tileset extensions are written.
*/
const CesiumJsonWriter::ExtensionWriterContext& getExtensions() const;
/**
* @brief Serializes the provided tileset object into a byte vector using the
* provided flags to convert.
*
* @param tileset The tileset.
* @param options Options for how to write the tileset.
* @return The result of writing the tileset.
*/
TilesetWriterResult writeTileset(
const Cesium3DTiles::Tileset& tileset,
const TilesetWriterOptions& options = TilesetWriterOptions()) const;
private:
CesiumJsonWriter::ExtensionWriterContext _context;
};
} // namespace Cesium3DTilesWriter