Blender V4.3
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>

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 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()

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

Definition at line 33 of file ply_import_data.cc.

References is_whitespace().

Referenced by blender::io::ply::load_face_element().

◆ drop_plus()

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

Definition at line 41 of file ply_import_data.cc.

Referenced by parse_float(), and parse_int().

◆ drop_whitespace()

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

Definition at line 25 of file ply_import_data.cc.

References is_whitespace().

Referenced by blender::io::ply::load_face_element(), parse_float(), and parse_int().

◆ endian_switch()

◆ endian_switch_array()

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

◆ is_whitespace()

static bool is_whitespace ( char c)
static

Definition at line 20 of file ply_import_data.cc.

Referenced by drop_non_whitespace(), and drop_whitespace().

◆ parse_float()

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

Definition at line 49 of file ply_import_data.cc.

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

Referenced by blender::io::ply::parse_row_ascii().

◆ parse_int()

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