|
scimesh 0.3.2
Headless CPU-only 3D software renderer for scientific mesh visualization
|
Compute per-vertex surface normals for lighting. More...


Go to the source code of this file.
Namespaces | |
| namespace | scimesh |
Functions | |
| void | scimesh::compute_vertex_normals (const Mesh &mesh, std::vector< Vec3 > &normals) |
| Compute per-vertex normals by averaging adjacent face normals. | |
Compute per-vertex surface normals for lighting.
Surface normals are direction vectors perpendicular to the surface at each vertex. They are essential for lighting — without normals, the renderer cannot tell which way a surface is facing and cannot compute shading.
Definition in file normals.h.