scimesh 0.3.2
Headless CPU-only 3D software renderer for scientific mesh visualization
Loading...
Searching...
No Matches
scimesh::gltf_io::detail Namespace Reference

Classes

struct  GltfOutput
 Serialized glTF scene: the JSON document plus the binary buffer. More...
 
struct  PackedMesh
 One mesh, packed into glTF-ready flat arrays. More...
 

Functions

std::string json_escape (const std::string &s)
 
std::string fmt (float v)
 Print a float compactly with enough digits to round-trip a float32.
 
std::string join_impl (const std::vector< std::string > &v)
 
void append_vertex (PackedMesh &pm, const Vec3 &v, const std::vector< Vec3 > *normals, uint32_t idx, const Color *color)
 
PackedMesh pack_mesh (const Mesh &mesh)
 
void pad_bin (std::vector< uint8_t > &bin, size_t align=4)
 
GltfOutput build (const Scene &scene, const Camera *camera)
 
std::string basename (const std::string &path)
 
std::string dirname (const std::string &path)
 
std::string stem (const std::string &path)
 
void write_bytes (const std::string &path, const std::vector< uint8_t > &data)
 

Function Documentation

◆ append_vertex()

void scimesh::gltf_io::detail::append_vertex ( PackedMesh pm,
const Vec3 v,
const std::vector< Vec3 > *  normals,
uint32_t  idx,
const Color color 
)
inline

Definition at line 98 of file gltf_io.h.

◆ basename()

std::string scimesh::gltf_io::detail::basename ( const std::string &  path)
inline

Definition at line 382 of file gltf_io.h.

◆ build()

GltfOutput scimesh::gltf_io::detail::build ( const Scene scene,
const Camera camera 
)
inline

Definition at line 177 of file gltf_io.h.

◆ dirname()

std::string scimesh::gltf_io::detail::dirname ( const std::string &  path)
inline

Definition at line 387 of file gltf_io.h.

◆ fmt()

std::string scimesh::gltf_io::detail::fmt ( float  v)
inline

Print a float compactly with enough digits to round-trip a float32.

Definition at line 80 of file gltf_io.h.

◆ join_impl()

std::string scimesh::gltf_io::detail::join_impl ( const std::vector< std::string > &  v)
inline

Definition at line 373 of file gltf_io.h.

◆ json_escape()

std::string scimesh::gltf_io::detail::json_escape ( const std::string &  s)
inline

Definition at line 58 of file gltf_io.h.

◆ pack_mesh()

PackedMesh scimesh::gltf_io::detail::pack_mesh ( const Mesh mesh)
inline

Definition at line 118 of file gltf_io.h.

◆ pad_bin()

void scimesh::gltf_io::detail::pad_bin ( std::vector< uint8_t > &  bin,
size_t  align = 4 
)
inline

Definition at line 173 of file gltf_io.h.

◆ stem()

std::string scimesh::gltf_io::detail::stem ( const std::string &  path)
inline

Definition at line 392 of file gltf_io.h.

◆ write_bytes()

void scimesh::gltf_io::detail::write_bytes ( const std::string &  path,
const std::vector< uint8_t > &  data 
)
inline

Definition at line 398 of file gltf_io.h.