Blender V5.0
ply_import_data.cc File Reference
#include "ply_import_data.hh"
#include "ply_data.hh"
#include "ply_import_buffer.hh"
#include "BLI_endian_switch.h"
#include "BLI_string_ref.hh"
#include "fast_float.h"
#include <charconv>
#include "CLG_log.h"

Go to the source code of this file.

Namespaces

namespace  blender
namespace  blender::io
namespace  blender::io::ply

Functions

static bool is_whitespace (char c)
static const char * drop_whitespace (const char *p, const char *end)
static const char * drop_non_whitespace (const char *p, const char *end)
static const char * drop_plus (const char *p, const char *end)
static const char * parse_float (const char *p, const char *end, float fallback, float &dst)
static const char * parse_int (const char *p, const char *end, int fallback, int &dst)
static void endian_switch (uint8_t *ptr, int type_size)
static void endian_switch_array (uint8_t *ptr, int type_size, int size)
static int blender::io::ply::get_index (const PlyElement &element, StringRef property)
static const char * blender::io::ply::parse_row_ascii (PlyReadBuffer &file, Vector< float > &r_values)
template<typename T>
static T blender::io::ply::get_binary_value (PlyDataTypes type, const uint8_t *&r_ptr)
static const char * blender::io::ply::parse_row_binary (PlyReadBuffer &file, const PlyHeader &header, const PlyElement &element, Vector< uint8_t > &r_scratch, Vector< float > &r_values)
static const char * blender::io::ply::load_vertex_element (PlyReadBuffer &file, const PlyHeader &header, const PlyElement &element, PlyData *data)
static uint32_t blender::io::ply::read_list_count (PlyReadBuffer &file, const PlyProperty &prop, Vector< uint8_t > &scratch, bool big_endian)
static void blender::io::ply::skip_property (PlyReadBuffer &file, const PlyProperty &prop, Vector< uint8_t > &scratch, bool big_endian)
static const char * blender::io::ply::load_face_element (PlyReadBuffer &file, const PlyHeader &header, const PlyElement &element, PlyData *data)
static const char * blender::io::ply::load_tristrips_element (PlyReadBuffer &file, const PlyHeader &header, const PlyElement &element, PlyData *data)
static const char * blender::io::ply::load_edge_element (PlyReadBuffer &file, const PlyHeader &header, const PlyElement &element, PlyData *data)
static const char * blender::io::ply::skip_element (PlyReadBuffer &file, const PlyHeader &header, const PlyElement &element)
std::unique_ptr< PlyDatablender::io::ply::import_ply_data (PlyReadBuffer &file, PlyHeader &header)

Variables

static CLG_LogRef LOG = {"io.ply"}
static const int blender::io::ply::data_type_size [] = {0, 1, 1, 2, 2, 4, 4, 4, 8}
static const float blender::io::ply::data_type_normalizer []

Function Documentation

◆ drop_non_whitespace()

const char * drop_non_whitespace ( const char * p,
const char * end )
static

Definition at line 36 of file ply_import_data.cc.

References is_whitespace().

◆ drop_plus()

const char * drop_plus ( const char * p,
const char * end )
static

Definition at line 44 of file ply_import_data.cc.

Referenced by parse_float(), and parse_int().

◆ drop_whitespace()

const char * drop_whitespace ( const char * p,
const char * end )
static

Definition at line 28 of file ply_import_data.cc.

References is_whitespace().

Referenced by parse_float(), and parse_int().

◆ endian_switch()

void endian_switch ( uint8_t * ptr,
int type_size )
static

◆ endian_switch_array()

void endian_switch_array ( uint8_t * ptr,
int type_size,
int size )
static

◆ is_whitespace()

bool is_whitespace ( char c)
static

Definition at line 23 of file ply_import_data.cc.

Referenced by drop_non_whitespace(), and drop_whitespace().

◆ parse_float()

const char * parse_float ( const char * p,
const char * end,
float fallback,
float & dst )
static

Definition at line 52 of file ply_import_data.cc.

References drop_plus(), drop_whitespace(), and ELEM.

◆ parse_int()

const char * parse_int ( const char * p,
const char * end,
int fallback,
int & dst )
static

Definition at line 63 of file ply_import_data.cc.

References drop_plus(), drop_whitespace(), and ELEM.

Variable Documentation

◆ LOG

CLG_LogRef LOG = {"io.ply"}
static

Definition at line 21 of file ply_import_data.cc.