Riser¶
Namespace Nfty.Model in assembly Nfty.Model.
Rises one finished picture into one solid. Every fully opaque pixel becomes a column of voxels spanning z ∈ [−(0.5 + back), 0.5 + front] — the paper plus its two depths — colored with the picture's own pixels. Geometry shared by the writers and the step-6 preview.
Remarks¶
One solid test (mixel's D1): Opacity.IsSolid(). A partial pixel anywhere is refused FIRST, by name; a picture with nothing solid returns null so a batch can skip and name it (D5). The picture is taken as a live Image, never bytes (D6).
The surface is closed and consistently oriented, not a strict 2-manifold. Greedy faces meet per-pixel walls at T-junctions (every T-vertex lies exactly on the longer edge — all coordinates are small integers and halves), and pixels touching only at a corner pinch four faces onto one edge. RiserSolidityTests asserts the true property; do not "fix" it back to "every edge shared by exactly two triangles", which a 2×1 strip already fails.
Methods¶
TryBuild(Image<Rgba32>, DepthMap?, RiseOptions, string, StackFaces?)¶
public static Mesh? TryBuild(Image<Rgba32> art, DepthMap? depth, RiseOptions options, string source = "the art", StackFaces? faces = null);
Builds the mesh for one picture.
Parameters
art(Image<Rgba32>) - The finished picture. Not modified; the caller keeps ownership.depth(DepthMap?) - Its depth map, the same size, ornullfor paper. Depth on a pixel that is not solid is ignored.options(RiseOptions) - Voxel size and pivot.RiseOptions.Formatis not used here.source(string) - How to name the picture in a refusal, e.g.variant 'red' of hat.igt.faces(StackFaces?) - The stack's face owners and wall seams, ornullfor a single picture (every wall takes the front color). The seam is clamped to the column.
Returns. The mesh, or null when no pixel is fully opaque. Its UVs address FaceAtlas.
Exceptions
PartialAlphaException- Some pixel is partly transparent.ArgumentException- The depth map or the faces are another size.ArgumentOutOfRangeException- The voxel size is not positive and finite, or the pivot is not one ofPivot's values.