Separate out concrete part of world

This commit is contained in:
2022-07-25 12:10:50 +01:00
parent 3354d108be
commit b2efbd2b3e
134 changed files with 933 additions and 930 deletions
+4 -4
View File
@@ -9,13 +9,13 @@ import Data.Maybe
import qualified IntMapHelp as IM
lightsToRender :: Configuration -> World -> [(Point3,Float,Point3)]
lightsToRender cfig w = mapMaybe getLS (IM.elems $ _lightSources w)
++ mapMaybe getTLS (_tempLightSources w)
lightsToRender cfig w = mapMaybe getLS (IM.elems $ _lightSources (_cWorld w))
++ mapMaybe getTLS (_tempLightSources (_cWorld w))
where
getLS = getlsparam . _lsParam
getTLS = getlsparam . _tlsParam
cbox = _boundBox w
cpos = _cameraCenter w
cbox = _boundBox (_cWorld w)
cpos = _cameraCenter (_cWorld w)
getlsparam ls
| not (pointInPolygon lpos cbox) && extraculltest = Nothing
| otherwise = Just ( _lsPos ls, rad^(2::Int) , _lsCol ls)