diff --git a/CesiumGltf/generated/include/CesiumGltf/ExtensionKhrGaussianSplatting.h b/CesiumGltf/generated/include/CesiumGltf/ExtensionKhrGaussianSplatting.h index aab5ec892..40f83fddf 100644 --- a/CesiumGltf/generated/include/CesiumGltf/ExtensionKhrGaussianSplatting.h +++ b/CesiumGltf/generated/include/CesiumGltf/ExtensionKhrGaussianSplatting.h @@ -21,6 +21,27 @@ struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final * key in the `extensions` object. */ static constexpr const char* ExtensionName = "KHR_gaussian_splatting"; + /** + * @brief Known values for Property specifying parameters regarding the kernel + * used to generate the Gaussians. + */ + struct Kernel { + /** @brief `ellipse` */ + inline static const std::string ellipse = "ellipse"; + }; + + /** + * @brief Known values for Property specifying the color space of the + * spherical harmonics. + */ + struct ColorSpace { + /** @brief `srgb_rec709_display` */ + inline static const std::string srgb_rec709_display = "srgb_rec709_display"; + + /** @brief `lin_rec709_display` */ + inline static const std::string lin_rec709_display = "lin_rec709_display"; + }; + /** * @brief Known values for Optional property specifying how to project the * Gaussians to achieve a perspective correct value. This property defaults to @@ -29,9 +50,6 @@ struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final struct Projection { /** @brief `perspective` */ inline static const std::string perspective = "perspective"; - - /** @brief `orthographic` */ - inline static const std::string orthographic = "orthographic"; }; /** @@ -41,40 +59,24 @@ struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final struct SortingMethod { /** @brief `cameraDistance` */ inline static const std::string cameraDistance = "cameraDistance"; - - /** @brief `zDepth` */ - inline static const std::string zDepth = "zDepth"; }; /** - * @brief Known values for Optional property specifying the color space of the - * spherical harmonics. This property defaults to BT.709. + * @brief Property specifying parameters regarding the kernel used to generate + * the Gaussians. + * + * Known values are defined in {@link Kernel}. + * */ - struct ColorSpace { - /** @brief `BT.709` */ - inline static const std::string BT_709 = "BT.709"; - - /** @brief `BT.2020-ITU` */ - inline static const std::string BT_2020_ITU = "BT.2020-ITU"; - - /** @brief `BT.2020-HLG` */ - inline static const std::string BT_2020_HLG = "BT.2020-HLG"; - - /** @brief `BT.2020-PQ` */ - inline static const std::string BT_2020_PQ = "BT.2020-PQ"; - - /** @brief `Display-P3` */ - inline static const std::string Display_P3 = "Display-P3"; - - /** @brief `linear` */ - inline static const std::string linear = "linear"; - }; + std::string kernel = Kernel::ellipse; /** - * @brief Optional property specifying parameters regarding the kernel used to - * generate the Gaussians. This property defaults to ellipse. + * @brief Property specifying the color space of the spherical harmonics. + * + * Known values are defined in {@link ColorSpace}. + * */ - std::string kernel = "ellipse"; + std::string colorSpace = ColorSpace::srgb_rec709_display; /** * @brief Optional property specifying how to project the Gaussians to achieve @@ -94,15 +96,6 @@ struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final */ std::string sortingMethod = SortingMethod::cameraDistance; - /** - * @brief Optional property specifying the color space of the spherical - * harmonics. This property defaults to BT.709. - * - * Known values are defined in {@link ColorSpace}. - * - */ - std::string colorSpace = ColorSpace::BT_709; - /** * @brief Calculates the size in bytes of this object, including the contents * of all collections, pointers, and strings. This will NOT include the size @@ -114,7 +107,7 @@ struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final accum += int64_t(sizeof(ExtensionKhrGaussianSplatting)); accum += CesiumUtility::ExtensibleObject::getSizeBytes() - int64_t(sizeof(CesiumUtility::ExtensibleObject)); - accum += int64_t(this->kernel.capacity() * sizeof(char)); + return accum; } }; diff --git a/CesiumGltfReader/generated/src/ExtensionKhrGaussianSplattingJsonHandler.h b/CesiumGltfReader/generated/src/ExtensionKhrGaussianSplattingJsonHandler.h index ec984a0ce..5e613160a 100644 --- a/CesiumGltfReader/generated/src/ExtensionKhrGaussianSplattingJsonHandler.h +++ b/CesiumGltfReader/generated/src/ExtensionKhrGaussianSplattingJsonHandler.h @@ -43,8 +43,8 @@ class ExtensionKhrGaussianSplattingJsonHandler private: CesiumGltf::ExtensionKhrGaussianSplatting* _pObject = nullptr; CesiumJsonReader::StringJsonHandler _kernel; + CesiumJsonReader::StringJsonHandler _colorSpace; CesiumJsonReader::StringJsonHandler _projection; CesiumJsonReader::StringJsonHandler _sortingMethod; - CesiumJsonReader::StringJsonHandler _colorSpace; }; } // namespace CesiumGltfReader diff --git a/CesiumGltfReader/generated/src/GeneratedJsonHandlers.cpp b/CesiumGltfReader/generated/src/GeneratedJsonHandlers.cpp index 1cef212aa..57d2c2789 100644 --- a/CesiumGltfReader/generated/src/GeneratedJsonHandlers.cpp +++ b/CesiumGltfReader/generated/src/GeneratedJsonHandlers.cpp @@ -3007,9 +3007,9 @@ ExtensionKhrGaussianSplattingJsonHandler:: const CesiumJsonReader::JsonReaderOptions& options) noexcept : CesiumJsonReader::ExtensibleObjectJsonHandler(options), _kernel(), + _colorSpace(), _projection(), - _sortingMethod(), - _colorSpace() {} + _sortingMethod() {} void ExtensionKhrGaussianSplattingJsonHandler::reset( CesiumJsonReader::IJsonHandler* pParentHandler, @@ -3051,15 +3051,15 @@ CesiumJsonReader::IJsonHandler* ExtensionKhrGaussianSplattingJsonHandler:: if ("kernel"s == str) { return property("kernel", this->_kernel, o.kernel); } + if ("colorSpace"s == str) { + return property("colorSpace", this->_colorSpace, o.colorSpace); + } if ("projection"s == str) { return property("projection", this->_projection, o.projection); } if ("sortingMethod"s == str) { return property("sortingMethod", this->_sortingMethod, o.sortingMethod); } - if ("colorSpace"s == str) { - return property("colorSpace", this->_colorSpace, o.colorSpace); - } return this->readObjectKeyExtensibleObject(objectType, str, *this->_pObject); } diff --git a/CesiumGltfWriter/generated/src/ModelJsonWriter.cpp b/CesiumGltfWriter/generated/src/ModelJsonWriter.cpp index 0252fafa3..ac7477f3d 100644 --- a/CesiumGltfWriter/generated/src/ModelJsonWriter.cpp +++ b/CesiumGltfWriter/generated/src/ModelJsonWriter.cpp @@ -1192,10 +1192,11 @@ void writeJson( const CesiumJsonWriter::ExtensionWriterContext& context) { jsonWriter.StartObject(); - if (obj.kernel != "ellipse") { - jsonWriter.Key("kernel"); - writeJson(obj.kernel, jsonWriter, context); - } + jsonWriter.Key("kernel"); + writeJson(obj.kernel, jsonWriter, context); + + jsonWriter.Key("colorSpace"); + writeJson(obj.colorSpace, jsonWriter, context); if (obj.projection != CesiumGltf::ExtensionKhrGaussianSplatting::Projection::perspective) { @@ -1209,12 +1210,6 @@ void writeJson( writeJson(obj.sortingMethod, jsonWriter, context); } - if (obj.colorSpace != - CesiumGltf::ExtensionKhrGaussianSplatting::ColorSpace::BT_709) { - jsonWriter.Key("colorSpace"); - writeJson(obj.colorSpace, jsonWriter, context); - } - writeExtensibleObject(obj, jsonWriter, context); jsonWriter.EndObject();