|
Blender V5.3
|
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"} |
| Enumerator | |
|---|---|
| SPZ_HEADER_ANTIALIASED | |
| SPZ_HEADER_HAS_EXTENSIONS | |
Definition at line 16 of file spz_header.hh.
|
static |
Definition at line 16 of file spz_header.cc.
References check_common_header_for_errors(), RPT_, blender::io::validate::size_fits_in_int(), and SPZ_HEADER_MAGIC.
Referenced by check_common_header_for_errors(), check_header_for_errors(), and check_header_for_errors().
|
nodiscard |
Definition at line 46 of file spz_header.cc.
References check_common_header_for_errors(), check_header_for_errors(), blender::io::spz::NgspFileHeader::num_streams, RPT_, and blender::io::spz::NgspFileHeader::toc_byte_offset.
|
nodiscard |
Definition at line 41 of file spz_header.cc.
References check_common_header_for_errors(), and check_header_for_errors().
Referenced by check_header_for_errors(), check_header_for_errors(), read_spz_gzip_compressed_file(), read_spz_ngsp_file(), blender::io::spz::tests::run_flags_tests(), blender::io::spz::tests::run_fractional_bits_tests(), blender::io::spz::tests::run_magic_tests(), blender::io::spz::tests::run_num_points_tests(), blender::io::spz::tests::run_sh_degrees_tests(), blender::io::spz::tests::TEST(), blender::io::spz::tests::TEST(), blender::io::spz::tests::TEST(), blender::io::spz::tests::TEST(), blender::io::spz::tests::TEST(), and blender::io::spz::tests::TEST().
| void blender::io::spz::convert_axis_to_blender | ( | const MutableSpan< float3 > | positions, |
| const MutableSpan< math::Quaternion > | rotations, | ||
| const Span< MutableSpan< float3 > > | sh_attrs ) |
Definition at line 102 of file spz_read_common.cc.
References convert_axis_to_blender(), blender::io::gsplat::degree_for_dimension(), blender::IndexRange::IndexRange(), blender::threading::parallel_for(), and blender::MutableSpan< T >::size().
Referenced by convert_axis_to_blender(), read_spz(), and read_spz_gzip_compressed_file().
| PointCloud * blender::io::spz::import_point_cloud | ( | const SPZImportParams & | import_params | ) |
Definition at line 82 of file spz_import.cc.
References blender::SPZImportParams::filepath, import_point_cloud(), read_spz_file(), and blender::SPZImportParams::reports.
Referenced by import_point_cloud(), and blender::SPZ_import_point_cloud().
| void blender::io::spz::importer_main | ( | const bContext * | C, |
| const SPZImportParams & | import_params ) |
Definition at line 35 of file spz_import.cc.
References blender::BKE_collection_object_add(), blender::BKE_layer_collection_get_active_editable(), blender::BKE_object_add_only_object(), blender::BKE_pointcloud_add(), blender::BKE_pointcloud_nomain_to_pointcloud(), blender::BKE_report(), blender::BKE_view_layer_base_deselect_all(), blender::BKE_view_layer_base_find(), blender::BKE_view_layer_base_select_and_set_active(), blender::BKE_view_layer_synced_ensure(), blender::BLI_path_basename(), blender::BLI_path_extension_strip(), C, blender::LayerCollection::collection, blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_data_view_layer(), blender::DEG_id_tag_update(), blender::DEG_id_tag_update_ex(), blender::DEG_relations_tag_update(), FILE_MAX, blender::SPZImportParams::filepath, blender::Collection::id, blender::Scene::id, ID_IS_EDITABLE, blender::ID_RECALC_ANIMATION, blender::ID_RECALC_BASE_FLAGS, blender::ID_RECALC_GEOMETRY, blender::ID_RECALC_SYNC_TO_EVAL, blender::ID_RECALC_TRANSFORM, importer_main(), blender::OB_POINTCLOUD, read_spz_file(), blender::SPZImportParams::reports, blender::RPT_WARNING, and blender::STRNCPY().
Referenced by importer_main(), and blender::SPZ_import().
|
inlinenodiscard |
Definition at line 77 of file spz_read_common.hh.
References blender::io::gsplat::OriginalActivationFunctions::decode_opacity(), float, blender::io::spz::internal::inv_sigmoid(), and read_alphas().
Referenced by read_alphas(), read_spz(), and read_spz_gzip_compressed_file().
|
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().
|
inlinenodiscard |
Definition at line 55 of file spz_read_common.hh.
References blender::BLI_assert(), position, read_positions(), blender::io::spz::internal::read_single_position_as_fixed(), and scale().
Referenced by read_positions(), read_spz(), and read_spz_gzip_compressed_file().
|
inlinenodiscard |
Definition at line 141 of file spz_read_common.hh.
References blender::math::dot(), float, M_SQRT1_2, blender::math::max(), read_rotations(), sign(), and blender::sqrt().
Referenced by read_rotations(), read_spz(), and read_spz_gzip_compressed_file().
|
inlinenodiscard |
Definition at line 123 of file spz_read_common.hh.
References blender::io::gsplat::OriginalActivationFunctions::decode_scale(), read_scales(), and scale().
Referenced by read_scales(), read_spz(), and read_spz_gzip_compressed_file().
|
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().
|
static |
Definition at line 197 of file spz_read_ngsp.cc.
References blender::BKE_report(), convert_axis_to_blender(), blender::io::spz::NgspFileHeader::fractional_bits, blender::io::gsplat::GsplatMutableAttributeAccessor::positions_for_write(), blender::io::gsplat::GsplatMutableAttributeAccessor::radiance_base_for_write(), read_alphas(), read_colors(), read_positions(), read_rotations(), read_scales(), read_sh(), read_spz(), blender::io::gsplat::GsplatMutableAttributeAccessor::rotations_for_write(), blender::RPT_ERROR, blender::io::gsplat::GsplatMutableAttributeAccessor::scales_for_write(), blender::io::gsplat::GsplatMutableAttributeAccessor::sh_for_write(), blender::Span< T >::size(), and blender::io::spz::NgspFileHeader::version.
Referenced by read_spz(), and read_spz_ngsp_file().
| PointCloud * blender::io::spz::read_spz_file | ( | const StringRefNull | filepath, |
| ReportList * | reports ) |
Definition at line 33 of file spz_read.cc.
References blender::BKE_report(), blender::BKE_reportf(), blender::BLI_fopen(), blender::StringRefNull::c_str(), CLOG_DEBUG, LOG, read_spz_file(), read_spz_gzip_compressed_file(), read_spz_ngsp_file(), read_spz_scalar(), blender::RPT_ERROR, and SPZ_HEADER_MAGIC.
Referenced by import_point_cloud(), importer_main(), and read_spz_file().
| PointCloud * blender::io::spz::read_spz_gzip_compressed_file | ( | FILE * | file, |
| ReportList * | reports ) |
Definition at line 126 of file spz_read_gzip.cc.
References blender::BKE_id_free(), blender::BKE_pointcloud_new_nomain(), blender::BKE_report(), blender::BKE_reportf(), check_header_for_errors(), CLOG_DEBUG, CLOG_WARN, convert_axis_to_blender(), blender::io::gsplat::GsplatMutableAttributeAccessor::finish(), blender::io::spz::PackedGaussiansHeader::flags, blender::io::spz::PackedGaussiansHeader::fractional_bits, blender::GSplat, blender::PointCloud::id, LOG, blender::io::spz::PackedGaussiansHeader::magic, blender::io::spz::PackedGaussiansHeader::num_points, blender::io::gsplat::GsplatMutableAttributeAccessor::positions_for_write(), blender::io::gsplat::GsplatMutableAttributeAccessor::radiance_base_for_write(), read_alphas(), read_colors(), read_positions(), read_rotations(), read_scales(), read_sh(), read_spz_gzip_compressed_file(), blender::io::gsplat::GsplatMutableAttributeAccessor::rotations_for_write(), blender::RPT_ERROR, blender::io::gsplat::GsplatMutableAttributeAccessor::scales_for_write(), blender::io::spz::PackedGaussiansHeader::sh_degree, blender::io::gsplat::GsplatMutableAttributeAccessor::sh_for_write(), SPZ_HEADER_ANTIALIASED, SPZ_HEADER_HAS_EXTENSIONS, and blender::io::spz::PackedGaussiansHeader::version.
Referenced by read_spz_file(), and read_spz_gzip_compressed_file().
| PointCloud * blender::io::spz::read_spz_ngsp_file | ( | FILE * | file, |
| ReportList * | reports ) |
Definition at line 294 of file spz_read_ngsp.cc.
References blender::BKE_id_free(), blender::BKE_pointcloud_new_nomain(), blender::BKE_report(), blender::BKE_reportf(), check_header_for_errors(), CLOG_DEBUG, CLOG_WARN, blender::io::gsplat::GsplatMutableAttributeAccessor::finish(), blender::io::spz::NgspFileHeader::flags, blender::io::spz::NgspFileHeader::fractional_bits, blender::GSplat, blender::PointCloud::id, LOG, blender::io::spz::NgspFileHeader::magic, blender::io::spz::NgspFileHeader::num_points, blender::io::spz::NgspFileHeader::num_streams, read_spz(), read_spz_ngsp_file(), read_spz_struct(), read_toc(), blender::RPT_ERROR, blender::io::spz::NgspFileHeader::sh_degree, SPZ_HEADER_ANTIALIASED, SPZ_HEADER_HAS_EXTENSIONS, blender::io::spz::NgspFileHeader::toc_byte_offset, and blender::io::spz::NgspFileHeader::version.
Referenced by read_spz_file(), and read_spz_ngsp_file().
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().
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().
|
static |
Definition at line 158 of file spz_read_ngsp.cc.
References blender::BLI_fseek(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), blender::io::spz::NgspFileHeader::num_streams, read_toc(), blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::io::spz::NgspFileHeader::toc_byte_offset.
Referenced by read_spz_ngsp_file(), and read_toc().
|
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().
|
static |
Definition at line 34 of file spz_read_gzip.cc.
|
static |
Definition at line 33 of file spz_read_ngsp.cc.
|
constexpr |
Definition at line 14 of file spz_header.hh.
Referenced by check_common_header_for_errors(), blender::io::spz::tests::make_default_valid_header(), and read_spz_file().