|
OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
|
#include <occtl_mesh.h>

Public Attributes | |
| const double * | nodes |
| size_t | node_count |
| const double * | normals |
| const double * | uvs |
| const uint32_t * | triangles |
| size_t | triangle_count |
| double | deflection |
| occtl_uid_t | source_uid |
Zero-copy view of a face triangulation.
Math-POD per ABI_PATTERNS.md §15 — not versioned (re-shape via a new type if the field set ever changes).
All pointer fields borrow from a per-graph internal cache. Each cache slot remembers the source node's version stamp; the next fetch after any mutation (builder, boolean op, compact, occtl_mesh_generate) sees the slot as stale and re-materialises into a fresh allocation. Existing pointers remain valid until this graph mutates and another fetch on the same face triggers re-materialisation, so callers that straddle a mutation must copy out or refetch.
Triangle indices are 0-indexed into nodes — buffers are materialised on first read into a per-face cache.
normals and uvs are NULL when the underlying triangulation carries no per-vertex normals / UV nodes; check before dereferencing.
| double occtl_triangulation_view::deflection |
Linear deflection used when this triangulation was generated.
| size_t occtl_triangulation_view::node_count |
Number of vertices in the triangulation.
| const double* occtl_triangulation_view::nodes |
xyz interleaved doubles, length 3 * node_count.
| const double* occtl_triangulation_view::normals |
xyz interleaved doubles, length 3 * node_count, or NULL when absent.
| occtl_uid_t occtl_triangulation_view::source_uid |
UID of the parent face. OCCTL_UID_INVALID if the cache could not resolve it.
| size_t occtl_triangulation_view::triangle_count |
Number of triangles.
| const uint32_t* occtl_triangulation_view::triangles |
0-indexed triplets into nodes, length 3 * triangle_count.
| const double* occtl_triangulation_view::uvs |
uv interleaved doubles, length 2 * node_count, or NULL when absent.