Skip to main content

Module cage

Module cage 

Source
Expand description

Cage: the control mesh a subdivision surface is the limit of, as a step’s arguments hold it — vertices, faces through them, and the edges creased sharp — and Mesh, the same mesh indexed, mirrored if asked to, and checked to be one a limit surface can be built from.

Every vertex and face has an id of its own, kept through every edit, so that what the limit surface is made of can be named after the cage element it comes from (see crate::limit): v3 and f7, and, on the mirrored half, v3m and f7m.

Structs§

Cage
A control cage: a mesh of faces of any number of sides — quads mostly, triangles and n-gons allowed — with the edges named in creases kept sharp. Ids are unique across vertices and faces, and next_id is the next one no element has had.
CageFace
A face of the cage: its vertices, counter-clockwise seen from outside.
CageVertex
A vertex of the cage: where it is.
Crease
An edge creased: kept sharp through the limit surface at a sharpness of one, bent a little less than smooth below it.
Mesh
The cage as the limit surface is built from it: indexed, the mirror image added, every element named.
Topology
How the faces of a mesh fit together: which face runs along each directed edge, and the faces around each vertex in order.

Enums§

Mirror
The plane the cage is mirrored in, if any: X is the plane x = 0 of the world. The cage holds one half; the other is its mirror image, joined to it along the vertices that lie on the plane.

Functions§

edge_key
The name of the edge between vertices a and b: e3-5, the smaller id first.
face_key
The name of the face id: f7.
next
The vertex after corner k of face f, the way the face runs.
prev
The vertex before corner k of face f, the way the face runs.
undirected
The edge between a and b, either way round: the smaller first.
vertex_key
The name of the vertex id: v3.