Blender V4.3
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 20 of file ply_import_buffer.cc.

References BLI_fopen().

◆ ~PlyReadBuffer()

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

Definition at line 26 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 33 of file ply_import_buffer.cc.

◆ 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 63 of file ply_import_buffer.cc.

References blender::Array< T, InlineBufferCapacity, Allocator >::data(), and int.

◆ 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 38 of file ply_import_buffer.cc.

References BLI_assert, blender::Array< T, InlineBufferCapacity, Allocator >::data(), is_newline(), and blender::Array< T, InlineBufferCapacity, Allocator >::size().


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