module Graphics.RedViz.Project.Utils ( fromProjectCamera ) where import Linear.V3 import Graphics.RedViz.Project.Project import Graphics.RedViz.Camera import Graphics.RedViz.Controllable import Graphics.RedViz.Utils fromProjectCamera :: ProjectCamera -> Camera fromProjectCamera :: ProjectCamera -> Camera fromProjectCamera ProjectCamera pcam = Camera defaultCam { _apt :: Double _apt = ProjectCamera -> Double _pApt ProjectCamera pcam , _foc :: Double _foc = ProjectCamera -> Double _pFoc ProjectCamera pcam , _controller :: Controllable _controller = Controllable defaultCamController { _transform :: M44 Double _transform = [Float] -> M44 Double fromList ( ProjectCamera -> [Float] _pTransform ProjectCamera pcam) } , _mouseS :: V3 Double _mouseS = Double -> V3 Double forall (f :: * -> *) a. Applicative f => a -> f a pure (Double -> V3 Double) -> Double -> V3 Double forall a b. (a -> b) -> a -> b $ ProjectCamera -> Double _pMouseS ProjectCamera pcam :: V3 Double , _keyboardRS :: V3 Double _keyboardRS = Double -> V3 Double forall (f :: * -> *) a. Applicative f => a -> f a pure (Double -> V3 Double) -> Double -> V3 Double forall a b. (a -> b) -> a -> b $ ProjectCamera -> Double _pKeyboardRS ProjectCamera pcam :: V3 Double , _keyboardTS :: V3 Double _keyboardTS = Double -> V3 Double forall (f :: * -> *) a. Applicative f => a -> f a pure (Double -> V3 Double) -> Double -> V3 Double forall a b. (a -> b) -> a -> b $ ProjectCamera -> Double _pKeyboardTS ProjectCamera pcam :: V3 Double }