chiark / gitweb /
hidden: wip a new Lens placeholder
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 30 Jan 2021 23:13:41 +0000 (23:13 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 31 Jan 2021 22:21:28 +0000 (22:21 +0000)
(Actually, we changed our mind about this and it was never used.)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/lens.rs

index e21e91881cac32a9afb3d339e36fcabc491f16e3..aabf608720d3d77131775d0c17585f9df6ca636d 100644 (file)
@@ -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)