pub struct SurfaceEntry {
pub program: Option<String>,
pub leaf: usize,
pub kind: u8,
pub version: u32,
pub document: Vec<u8>,
}Expand description
One painted mask of one leaf.
Fields§
§program: Option<String>The program the paint belongs to, such as nudl, by the rules of a
program name (crate::is_program_name). None only for an entry
read from chunk version 1, which named no program: a program that
writes it back names the program that painted it, if it knows it, and
otherwise itself.
leaf: usizeThe painted leaf, as an index into the scene’s nodes.
kind: u8What the paint means: 0 detail, 1 supports must touch, 2 supports
must not touch, 3 supports both ways (see crate::paint). Other
values are reserved, and carried as they are.
version: u32The version of the document.
document: Vec<u8>The mask, carried without being read.
Implementations§
Source§impl SurfaceEntry
impl SurfaceEntry
Sourcepub fn paint(&self, mesh: &Mesh) -> Option<PaintDocument>
pub fn paint(&self, mesh: &Mesh) -> Option<PaintDocument>
The entry’s document, when a reader keeps it for the leaf’s mesh
(section 10.2): a kind and a document version this build knows, a
document that is not malformed, made on mesh, covering it, and with
values its kind allows. None means the entry is treated as absent.