TriangleMesh
The equations of simgeometry.objects.triangle_mesh, declared on the code that implements them and checked by the tests.
TriangleMesh
classsourceA surface made of triangles: closed (a solid) or open (panels).
- volume
- normal
- inside
- nodes
- Order
- 2
- Assumes
- closed: every edge in exactly two faces, each directed edge once (consistent orientation); faces are reoriented so that and points out
- open meshes have no inside (
containsis False everywhere) and their normals face the incoming segment - a uniform grid of about four cells per face over the mesh's box, shifted by irrational fractions of a cell; every cell lists the faces whose box (widened by cells) overlaps it
- first hits walk the segment's cells in order (Amanatides and Woo) and test their faces exactly (Möller–Trumbore), stopping once the nearest hit lies before the cell's exit; hits at are ignored
- exact for the triangles, except for a segment through an edge or vertex exactly, where a crossing may count twice
- the order is that of the volume of a sphere's mesh in the angular spacing
- References
- Built from