Add more deriving clauses

This commit is contained in:
2022-07-25 09:26:41 +01:00
parent c3a5b9d5be
commit d62e14cdb5
8 changed files with 22 additions and 13 deletions
+6 -3
View File
@@ -5,30 +5,33 @@ import Geometry
import Control.Lens
data LightSourceDraw = DefaultLightSourceDraw
deriving (Eq,Ord,Show,Read)
data TLSIntensity = ConstantIntensity
| TLSFade Point3 Int
deriving (Eq,Ord,Show,Read)
data TLSUpdate = DestroyTLS
| TimerTLS
| IntensityTLS TLSIntensity
deriving (Eq,Ord,Show,Read)
data LSParam = LSParam
{ _lsPos :: !Point3
, _lsRad :: !Float
, _lsCol :: !Point3
}
deriving (Eq,Ord,Show,Read)
data LightSource = LS
{ _lsID :: Int
, _lsParam :: LSParam
, _lsDir :: Float
, _lsPict :: LightSourceDraw --LightSource -> Picture
}
deriving (Eq,Ord,Show,Read)
data TempLightSource = TLS
{ _tlsParam :: LSParam
, _tlsUpdate :: TLSUpdate --TempLightSource -> Maybe TempLightSource
, _tlsTime :: Int
}
deriving (Eq,Ord,Show,Read)
makeLenses ''LSParam
makeLenses ''LightSource
makeLenses ''TempLightSource