Blender V5.3
blender::io::spz Namespace Reference

Namespaces

namespace  internal
namespace  tests

Classes

struct  NgspFileHeader
struct  PackedGaussiansHeader

Enumerations

enum  HeaderFlag { SPZ_HEADER_ANTIALIASED = 0x01 , SPZ_HEADER_HAS_EXTENSIONS = 0x02 }

Functions

void importer_main (const bContext *C, const SPZImportParams &import_params)
PointCloud * import_point_cloud (const SPZImportParams &import_params)
template<typename Header>
static std::optional< std::string > check_common_header_for_errors (const Header &header, const uint32_t min_version, const uint32_t max_version)
std::optional< std::string > check_header_for_errors (const PackedGaussiansHeader &header)
std::optional< std::string > check_header_for_errors (const NgspFileHeader &header)
template<class T>
static bool read_spz_scalar (FILE *file, T &data)
PointCloud * read_spz_file (const StringRefNull filepath, ReportList *reports)
PointCloud * read_spz_gzip_compressed_file (FILE *file, ReportList *reports)
PointCloud * read_spz_ngsp_file (FILE *file, ReportList *reports)
void convert_axis_to_blender (const MutableSpan< float3 > positions, const MutableSpan< math::Quaternion > rotations, const Span< MutableSpan< float3 > > sh_attrs)
template<class ReaderType>
bool read_positions (ReaderType &reader, const int fractional_bits, const MutableSpan< float3 > positions)
template<class ReaderType>
bool read_alphas (ReaderType &reader, const MutableSpan< float4 > radiance_base)
template<class ReaderType>
bool read_colors (ReaderType &reader, const MutableSpan< float4 > radiance_base)
template<class ReaderType>
bool read_scales (ReaderType &reader, const MutableSpan< float3 > scales)
template<class ReaderType>
bool read_rotations (ReaderType &reader, const int version, const MutableSpan< math::Quaternion > rotations)
template<class ReaderType>
bool read_sh (ReaderType &reader, const Span< MutableSpan< float3 > > sh)
template<class T>
static bool read_spz_struct (FILE *file, T &data)
static bool read_toc (FILE *file, const NgspFileHeader &header, Array< StreamInfo > &stream_infos)
static bool read_spz (FILE *file, const NgspFileHeader &header, const Span< StreamInfo > stream_infos, ReportList *reports, gsplat::GsplatMutableAttributeAccessor &accessor)

Variables

constexpr uint32_t SPZ_HEADER_MAGIC = 0x5053474e
static CLG_LogRef LOG = {"io.spz"}
static CLG_LogRef LOG = {"io.spz"}
static CLG_LogRef LOG = {"io.spz"}

Enumeration Type Documentation

◆ HeaderFlag

Enumerator
SPZ_HEADER_ANTIALIASED 
SPZ_HEADER_HAS_EXTENSIONS 

Definition at line 16 of file spz_header.hh.

Function Documentation

◆ check_common_header_for_errors()

template<typename Header>
std::optional< std::string > blender::io::spz::check_common_header_for_errors ( const Header & header,
const uint32_t min_version,
const uint32_t max_version )
static

◆ check_header_for_errors() [1/2]

std::optional< std::string > blender::io::spz::check_header_for_errors ( const NgspFileHeader & header)
nodiscard

◆ check_header_for_errors() [2/2]

◆ convert_axis_to_blender()

◆ import_point_cloud()

PointCloud * blender::io::spz::import_point_cloud ( const SPZImportParams & import_params)

◆ importer_main()

◆ read_alphas()

template<class ReaderType>
bool blender::io::spz::read_alphas ( ReaderType & reader,
const MutableSpan< float4 > radiance_base )
inlinenodiscard

◆ read_colors()

template<class ReaderType>
bool blender::io::spz::read_colors ( ReaderType & reader,
const MutableSpan< float4 > radiance_base )
inlinenodiscard

Definition at line 100 of file spz_read_common.hh.

References read_colors().

Referenced by read_colors(), read_spz(), and read_spz_gzip_compressed_file().

◆ read_positions()

template<class ReaderType>
bool blender::io::spz::read_positions ( ReaderType & reader,
const int fractional_bits,
const MutableSpan< float3 > positions )
inlinenodiscard

◆ read_rotations()

template<class ReaderType>
bool blender::io::spz::read_rotations ( ReaderType & reader,
const int version,
const MutableSpan< math::Quaternion > rotations )
inlinenodiscard

◆ read_scales()

template<class ReaderType>
bool blender::io::spz::read_scales ( ReaderType & reader,
const MutableSpan< float3 > scales )
inlinenodiscard

◆ read_sh()

template<class ReaderType>
bool blender::io::spz::read_sh ( ReaderType & reader,
const Span< MutableSpan< float3 > > sh )
inlinenodiscard

Definition at line 208 of file spz_read_common.hh.

References read_sh().

Referenced by read_sh(), read_spz(), and read_spz_gzip_compressed_file().

◆ read_spz()

◆ read_spz_file()

◆ read_spz_gzip_compressed_file()

◆ read_spz_ngsp_file()

◆ read_spz_scalar()

template<class T>
bool blender::io::spz::read_spz_scalar ( FILE * file,
T & data )
static

Definition at line 25 of file spz_read.cc.

References blender::data, read_spz_scalar(), and T.

Referenced by read_spz_file(), and read_spz_scalar().

◆ read_spz_struct()

template<class T>
bool blender::io::spz::read_spz_struct ( FILE * file,
T & data )
static

Definition at line 150 of file spz_read_ngsp.cc.

References blender::data, read_spz_struct(), and T.

Referenced by read_spz_ngsp_file(), and read_spz_struct().

◆ read_toc()

Variable Documentation

◆ LOG [1/3]

CLG_LogRef blender::io::spz::LOG = {"io.spz"}
static

Definition at line 23 of file spz_read.cc.

Referenced by read_spz_file(), read_spz_gzip_compressed_file(), and read_spz_ngsp_file().

◆ LOG [2/3]

CLG_LogRef blender::io::spz::LOG = {"io.spz"}
static

Definition at line 34 of file spz_read_gzip.cc.

◆ LOG [3/3]

CLG_LogRef blender::io::spz::LOG = {"io.spz"}
static

Definition at line 33 of file spz_read_ngsp.cc.

◆ SPZ_HEADER_MAGIC

uint32_t blender::io::spz::SPZ_HEADER_MAGIC = 0x5053474e
constexpr