Skip to content

StackRise

Namespace Nfty.Model in assembly Nfty.Model.

public sealed class StackRise : IDisposable

What the stack rule makes of a stack: the art, the union depth map and the face owners' pictures. Owns StackRise.Art and StackRise.Faces.

Properties

Art

public Image<Rgba32> Art { get; }

The picture the stack shows from the front (the compositor's composite, or the finished picture it was given).

Depth

public DepthMap Depth { get; }

Per pixel, the union of the solid layers' columns, as a map of its own (a copy of the current state: StackDepth.CombineInto() updates a rise in place).

Faces

public StackFaces Faces { get; }

The front and back owners' pictures and the wall seams.

Methods

BackOwner(int, int)

public int BackOwner(int x, int y);

The layer that owns the back face at a pixel.

Parameters

  • x (int) - Column.
  • y (int) - Row.

Returns. As StackRise.FrontOwner(), for the back face.

DepthAt(int, int)

public DepthPixel DepthAt(int x, int y);

The union depth at a pixel, without building a map.

Parameters

  • x (int) - Column.
  • y (int) - Row.

Returns. The pair; 0/0 on a pixel no layer covers.

Dispose()

public void Dispose();

Disposes the art and the face pictures this rise owns.

FrontOwner(int, int)

public int FrontOwner(int x, int y);

The layer that owns the front face at a pixel.

Parameters

  • x (int) - Column.
  • y (int) - Row.

Returns. The bottom-first index into the layers given to the combine (for a selection or asset, into the PRESENT picks in the order given); -1 on a pixel no layer covers. Ties go to the upper layer.