Files
loop/src/Dodge/Data/LightSource.hs
T
2022-07-16 18:07:43 +01:00

27 lines
656 B
Haskell

{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.Data.LightSource where
import Geometry
import Picture.Data
import Control.Lens
data LSParam = LSParam
{ _lsPos :: !Point3
, _lsRad :: !Float
, _lsCol :: !Point3
}
data LightSource = LS
{ _lsID :: !Int
, _lsParam :: LSParam
, _lsDir :: !Float
, _lsPict :: LightSource -> Picture
}
data TempLightSource = TLS
{ _tlsParam :: LSParam
, _tlsUpdate :: TempLightSource -> Maybe TempLightSource
, _tlsTime :: !Int
}
makeLenses ''LSParam
makeLenses ''LightSource
makeLenses ''TempLightSource