A partial fix for rendering finite lines.

This commit is contained in:
bʰedoh₂ swé 2024-04-05 19:24:50 +05:00
parent 56228bc8b1
commit 2b0e9cbeef

View File

@ -1,7 +1,7 @@
from cmath import exp
from constants import I, BLACK
from gyro import MobiusInt, MobiusAdd, MobiusDist, cDot
from gyro import MobiusInt, MobiusAdd, MobiusDist, cDot, Poincare2Klein
from lines import cBetween
from numba import jit, byte, double, prange, optional
@ -38,7 +38,7 @@ def draw(level,gPlayer,fov,res):
if cDot(rot,MobiusAdd(cInt,-gPlayer.cPos)) > 0:
continue
rDist = MobiusDist(cInt,gPlayer.cPos)*1.1
if j.isFinite and not cBetween(j.pointA,j.pointB,cInt):
if j.isFinite and not cBetween(Poincare2Klein(j.pointA),Poincare2Klein(j.pointB),Poincare2Klein(cInt)):
continue
if m is None:
m = DrawnSegment(rDist,j.color)