Implement basic laser sensor
This commit is contained in:
@@ -12,10 +12,10 @@ module Dodge.LightSources.Lamp
|
||||
where
|
||||
import Dodge.Data
|
||||
import Geometry.Data
|
||||
import Picture
|
||||
import ShapePicture
|
||||
import Shape
|
||||
import Geometry
|
||||
import Dodge.Default
|
||||
|
||||
import Control.Lens
|
||||
|
||||
@@ -26,13 +26,8 @@ colorLightAt col pos i =
|
||||
,_lsDir = 0
|
||||
,_lsRad = 700
|
||||
,_lsIntensity = col
|
||||
,_lsPict = lightSourcePicture
|
||||
,_lsPict = defLSPic
|
||||
}
|
||||
lightSourcePicture :: LightSource -> Picture
|
||||
lightSourcePicture ls = setLayer 1 . translate3 (_lsPos ls) . color col $ circleSolid 4
|
||||
where
|
||||
col = V4 r g b 2
|
||||
V3 r g b = _lsIntensity ls
|
||||
|
||||
lightAt :: Point3 -> Int -> LightSource
|
||||
lightAt = colorLightAt 0.75
|
||||
|
||||
Reference in New Issue
Block a user