Blender V5.0
blender::io::ply::PlyReadBuffer Class Reference

#include <ply_import_buffer.hh>

Public Member Functions

 PlyReadBuffer (const char *file_path, size_t read_buffer_size=64 *1024)
 ~PlyReadBuffer ()
void after_header (bool is_binary)
Span< char > read_line ()
bool read_bytes (void *dst, size_t size)

Detailed Description

Reads underlying PLY file in large chunks, and provides interface for ASCII/header parsing to read individual lines, and for binary parsing to read chunks of bytes.

Definition at line 22 of file ply_import_buffer.hh.

Constructor & Destructor Documentation

◆ PlyReadBuffer()

blender::io::ply::PlyReadBuffer::PlyReadBuffer ( const char * file_path,
size_t read_buffer_size = 64 * 1024 )

Definition at line 21 of file ply_import_buffer.cc.

References BLI_fopen().

◆ ~PlyReadBuffer()

blender::io::ply::PlyReadBuffer::~PlyReadBuffer ( )

Definition at line 27 of file ply_import_buffer.cc.

Member Function Documentation

◆ after_header()

void blender::io::ply::PlyReadBuffer::after_header ( bool is_binary)

After header is parsed, indicate whether the rest of reading will be ASCII or binary.

Definition at line 34 of file ply_import_buffer.cc.

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

◆ read_bytes()

bool blender::io::ply::PlyReadBuffer::read_bytes ( void * dst,
size_t size )

Reads a number of bytes into provided destination pointer. Returns false if this amount of bytes can not be read.

Definition at line 64 of file ply_import_buffer.cc.

References size().

Referenced by blender::io::ply::load_face_element(), blender::io::ply::load_tristrips_element(), blender::io::ply::parse_row_binary(), blender::io::ply::read_list_count(), and blender::io::ply::skip_property().

◆ read_line()

Span< char > blender::io::ply::PlyReadBuffer::read_line ( )

Gets the next line from the file as a Span. The line does not include any newline characters.

Definition at line 39 of file ply_import_buffer.cc.

References BLI_assert, and is_newline().

Referenced by blender::io::ply::load_face_element(), blender::io::ply::load_tristrips_element(), blender::io::ply::parse_row_ascii(), blender::io::ply::read_header(), and blender::io::ply::skip_element().


The documentation for this class was generated from the following files: