PixelRecord

Qualified name: algan.viewer.pixels.PixelRecord

class PixelRecord(capture, mob_by_id=None)[source]

Bases: object

One render chunk’s coverage, indexed by pixel.

Wraps the dict algan.rendering.fragment_capture.capture() produced and resolves the two things a caller cannot work out for itself: where a pixel lives in the flat covered-cell list, and which Mob a surface id belongs to.

Methods

fragments

The depth-sorted fragment list behind image pixel (x, y).

raw_fragment_count

How many raw hits the sheets at this pixel were compacted from.

Attributes

frames

The frame indices this chunk covers, as the capture encodes them.

fragments(x, y, frame_rel=0)[source]

The depth-sorted fragment list behind image pixel (x, y).

Nearest first, as the compaction already ordered them. Returns an empty list for a pixel nothing covers – background shows through there, which is a real answer rather than a missing one.

property frames

The frame indices this chunk covers, as the capture encodes them.

raw_fragment_count(x, y, frame_rel=0)[source]

How many raw hits the sheets at this pixel were compacted from.