122 lines
3.9 KiB
C++
122 lines
3.9 KiB
C++
// This file was generated by generate-classes.
|
|
// DO NOT EDIT THIS FILE!
|
|
#pragma once
|
|
|
|
#include <CesiumGltf/Library.h>
|
|
#include <CesiumUtility/ExtensibleObject.h>
|
|
|
|
#include <string>
|
|
|
|
namespace CesiumGltf {
|
|
/**
|
|
* @brief Data defining a 3D Gaussian Splat primitive.
|
|
*/
|
|
struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final
|
|
: public CesiumUtility::ExtensibleObject {
|
|
/**
|
|
* @brief The original name of this type.
|
|
*/
|
|
static constexpr const char* TypeName = "ExtensionKhrGaussianSplatting";
|
|
/** @brief The official name of the extension. This should be the same as its
|
|
* key in the `extensions` object. */
|
|
static constexpr const char* ExtensionName = "KHR_gaussian_splatting";
|
|
|
|
/**
|
|
* @brief Known values for Optional property specifying how to project the
|
|
* Gaussians to achieve a perspective correct value. This property defaults to
|
|
* perspective.
|
|
*/
|
|
struct Projection {
|
|
/** @brief `perspective` */
|
|
inline static const std::string perspective = "perspective";
|
|
|
|
/** @brief `orthographic` */
|
|
inline static const std::string orthographic = "orthographic";
|
|
};
|
|
|
|
/**
|
|
* @brief Known values for Optional property specifying how to sort the
|
|
* Gaussians during rendering. This property defaults to cameraDistance.
|
|
*/
|
|
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.
|
|
*/
|
|
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";
|
|
};
|
|
|
|
/**
|
|
* @brief Optional property specifying parameters regarding the kernel used to
|
|
* generate the Gaussians. This property defaults to ellipse.
|
|
*/
|
|
std::string kernel = "ellipse";
|
|
|
|
/**
|
|
* @brief Optional property specifying how to project the Gaussians to achieve
|
|
* a perspective correct value. This property defaults to perspective.
|
|
*
|
|
* Known values are defined in {@link Projection}.
|
|
*
|
|
*/
|
|
std::string projection = Projection::perspective;
|
|
|
|
/**
|
|
* @brief Optional property specifying how to sort the Gaussians during
|
|
* rendering. This property defaults to cameraDistance.
|
|
*
|
|
* Known values are defined in {@link SortingMethod}.
|
|
*
|
|
*/
|
|
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
|
|
* of any extensions attached to the object. Calling this method may be slow
|
|
* as it requires traversing the object's entire structure.
|
|
*/
|
|
int64_t getSizeBytes() const {
|
|
int64_t accum = 0;
|
|
accum += int64_t(sizeof(ExtensionKhrGaussianSplatting));
|
|
accum += CesiumUtility::ExtensibleObject::getSizeBytes() -
|
|
int64_t(sizeof(CesiumUtility::ExtensibleObject));
|
|
accum += int64_t(this->kernel.capacity() * sizeof(char));
|
|
return accum;
|
|
}
|
|
};
|
|
} // namespace CesiumGltf
|