Skip to content

mesh reader library

Paweł Waligóra edited this page Feb 27, 2025 · 3 revisions

Mesh Reader Library

A single header file located in src/ folder, that makes it easier to read data form files made by mesh compiler.

Find file here mesh-compiler/src/meshReader.h

Usage

To use just copy the file to your project.

Library allows to define allocation_limit for single mesh_reader::readBuffer(...) up to 2.3.0 call.

Change definition in line 4 (is set to 10 MB by default), (definition is in bytes):

#pragma once
#include <fstream>
#include <vector>
#define allocation_limit 10485760 // 10 MB

//...

Delete or comment this line to get rid of the limit entirely.

Since version 2.4.0 instead of mesh_reader::readBuffer() there are 3 functions:

  • mesh_reader::read_big_endian_buffer(...)
  • mesh_reader::read_little_endian_buffer(...)
  • mesh_reader::read_native_endian_buffer(...)

They work the same way as mesh_reader::readBuffer(...), but are aware of the endianness of sourced file.

Clone this wiki locally