47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <filesystem>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace XC3DGSD3D12 {
|
|
|
|
struct Float3 {
|
|
float x = 0.0f;
|
|
float y = 0.0f;
|
|
float z = 0.0f;
|
|
};
|
|
|
|
struct GaussianSplatRuntimeData {
|
|
static constexpr uint32_t kColorTextureWidth = 2048;
|
|
static constexpr uint32_t kPositionStride = sizeof(float) * 3;
|
|
static constexpr uint32_t kOtherStride = sizeof(uint32_t) + sizeof(float) * 3;
|
|
static constexpr uint32_t kColorStride = sizeof(float) * 4;
|
|
static constexpr uint32_t kShCoefficientCount = 15;
|
|
static constexpr uint32_t kShStride = sizeof(float) * 3 * 16;
|
|
|
|
uint32_t splatCount = 0;
|
|
uint32_t colorTextureWidth = kColorTextureWidth;
|
|
uint32_t colorTextureHeight = 0;
|
|
Float3 boundsMin = {};
|
|
Float3 boundsMax = {};
|
|
std::vector<std::byte> positionData;
|
|
std::vector<std::byte> otherData;
|
|
std::vector<std::byte> colorData;
|
|
std::vector<std::byte> shData;
|
|
};
|
|
|
|
bool LoadGaussianSceneFromPly(
|
|
const std::filesystem::path& filePath,
|
|
GaussianSplatRuntimeData& outData,
|
|
std::string& outErrorMessage);
|
|
|
|
bool WriteGaussianSceneSummary(
|
|
const std::filesystem::path& filePath,
|
|
const GaussianSplatRuntimeData& data,
|
|
std::string& outErrorMessage);
|
|
|
|
} // namespace XC3DGSD3D12
|