scimesh 0.3.2
Headless CPU-only 3D software renderer for scientific mesh visualization
Loading...
Searching...
No Matches
mesh.h File Reference

The Mesh — the central data structure for 3D geometry in scimesh. More...

#include <scimesh/types.h>
#include <scimesh/image.h>
#include <vector>
#include <cmath>
Include dependency graph for mesh.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  scimesh::Mesh
 A 3D triangle mesh using an indexed face set representation. More...
 

Namespaces

namespace  scimesh
 

Detailed Description

The Mesh — the central data structure for 3D geometry in scimesh.

A Mesh is an indexed face set: vertices are stored once in an array, and triangles reference them by index. This is the standard representation used in computer graphics, file formats like OBJ/STL/PLY, and GPU buffers.

Data layout (indexed face set)
vertices = [v0, v1, v2, v3, ...] // 3D positions
triangles = [{v0=0, v1=1, v2=2}, ...] // indices into vertices[]
colors = [c0, c1, c2, c3, ...] // per-vertex colors (optional)
normals = [n0, n1, n2, n3, ...] // per-vertex normals (optional)
uvs = [uv0, uv1, uv2, uv3, ...] // texture coordinates (optional)

Definition in file mesh.h.