Simplify laser reflection/refraction
This commit is contained in:
@@ -13,8 +13,8 @@ wlIsSeeThrough wl = case _wlOpacity wl of
|
||||
SeeThrough -> True
|
||||
_ -> False
|
||||
|
||||
reflDirWall :: Point2 -> Point2 -> Wall -> Float
|
||||
reflDirWall sp ep wl = argV (reflectIn (uncurry (-.-) (_wlLine wl)) (ep -.- sp))
|
||||
reflWall :: Point2 -> Point2 -> Wall -> Float
|
||||
reflWall sp ep wl = argV (reflectIn (uncurry (-) (_wlLine wl)) (ep - sp))
|
||||
|
||||
-- point free nonsense. 0 for no damping, 1 for full damping
|
||||
reflVelWallDamp :: Float -> Wall -> Point2 -> Point2
|
||||
|
||||
Reference in New Issue
Block a user