From: Ian Jackson Date: Sat, 30 Jan 2021 23:13:41 +0000 (+0000) Subject: hidden: wip a new Lens placeholder X-Git-Tag: otter-0.4.0~592 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=6c144434a4dafdd1808df580b34f81a5f4755f75;p=otter.git hidden: wip a new Lens placeholder (Actually, we changed our mind about this and it was never used.) Signed-off-by: Ian Jackson --- diff --git a/src/lens.rs b/src/lens.rs index e21e9188..aabf6087 100644 --- a/src/lens.rs +++ b/src/lens.rs @@ -14,6 +14,11 @@ use crate::imports::*; pub trait Lens : Debug { fn new_hidden_todo(&self, why: &'static str); + /// Will be replaced by some call to an Occlusion + fn new_hidden_pri(&self, id: VisiblePieceId, + angle: VisiblePieceAngle, face: FaceId) + -> PieceRenderInstructions; + fn pieceid2visible(&self, piece: PieceId) -> VisiblePieceId; fn log_pri(&self, piece: PieceId, pc: &PieceState) -> PieceRenderInstructions; @@ -28,6 +33,12 @@ pub struct TransparentLens { } impl Lens for TransparentLens { fn new_hidden_todo(&self, _why: &'static str) { } + fn new_hidden_pri(&self, id: VisiblePieceId, + angle: VisiblePieceAngle, face: FaceId) + -> PieceRenderInstructions { + PieceRenderInstructions { id, angle, face } + } + fn pieceid2visible(&self, piece: PieceId) -> VisiblePieceId { let kd : slotmap::KeyData = piece.data(); VisiblePieceId(kd)