Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data ProjectionKind
- data Projection (pk :: ProjectionKind) = Projection {
- projectionTransform :: Transform
- projectionInverse :: ~Transform
- type family ProjectionParams (pk :: ProjectionKind) where ...
- data ProjectionInput (pk :: ProjectionKind) = ProjectionInput {}
- type ProjectionProcess pk = Cell (ProjectionInput pk) (Projection pk)
- spawnPerspective :: (MonadReader (App GlobalHandles st) m, MonadResource m, MonadUnliftIO m) => m (ProjectionProcess 'Perspective)
- mkTransformPerspective :: Extent2D -> ProjectionInput 'Perspective -> Transform
- spawnOrthoPixelsCentered :: (MonadReader (App GlobalHandles st) m, MonadResource m, MonadUnliftIO m) => m (ProjectionProcess 'Orthographic)
- mkTransformOrthoPixelsCentered :: Extent2D -> ProjectionInput 'Orthographic -> Transform
- spawnProjectionWith :: (MonadReader (App GlobalHandles st) m, MonadResource m, MonadUnliftIO m) => (Extent2D -> ProjectionInput pk -> Transform) -> ProjectionInput pk -> m (ProjectionProcess pk)
- spawnProjection :: (MonadReader (App GlobalHandles st) m, MonadResource m, MonadUnliftIO m) => (Extent2D -> ProjectionInput pk -> Transform) -> ProjectionParams pk -> m (ProjectionProcess pk)
- pattern PROJECTION_NEAR :: (Eq a, Num a, Fractional a) => a
- pattern PROJECTION_FAR :: (Eq a, Num a) => a
- data View = View {
- viewTransform :: Transform
- viewTransformInv :: Transform
- viewPosition :: Vec3
- viewDirection :: Vec3
- type ViewProcess = Cell ViewOrbitalInput View
- data ViewOrbitalInput = ViewOrbitalInput {
- orbitAzimuth :: Float
- orbitAscent :: Float
- orbitDistance :: Float
- orbitScale :: Float
- orbitTarget :: Vec3
- orbitUp :: Vec3
- orbitRight :: Vec3
- initialOrbitalInput :: ViewOrbitalInput
- mkViewOrbital :: Vec3 -> ViewOrbitalInput -> View
- mkViewOrbital_ :: ViewOrbitalInput -> View
Documentation
data ProjectionKind Source #
Instances
data Projection (pk :: ProjectionKind) Source #
Projection | |
|
Instances
Generic (Projection pk) Source # | |
Defined in Engine.Camera from :: Projection pk -> Rep (Projection pk) x Source # to :: Rep (Projection pk) x -> Projection pk Source # | |
Show (Projection pk) Source # | |
Defined in Engine.Camera | |
type Rep (Projection pk) Source # | |
Defined in Engine.Camera type Rep (Projection pk) = D1 ('MetaData "Projection" "Engine.Camera" "keid-core-0.1.8.0-inplace" 'False) (C1 ('MetaCons "Projection" 'PrefixI 'True) (S1 ('MetaSel ('Just "projectionTransform") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Transform) :*: S1 ('MetaSel ('Just "projectionInverse") 'NoSourceUnpackedness 'SourceLazy 'DecidedLazy) (Rec0 Transform))) |
type family ProjectionParams (pk :: ProjectionKind) where ... Source #
ProjectionParams 'Perspective = "fov-v" ::: Float | |
ProjectionParams 'Orthographic = () |
data ProjectionInput (pk :: ProjectionKind) Source #
type ProjectionProcess pk = Cell (ProjectionInput pk) (Projection pk) Source #
spawnPerspective :: (MonadReader (App GlobalHandles st) m, MonadResource m, MonadUnliftIO m) => m (ProjectionProcess 'Perspective) Source #
mkTransformPerspective :: Extent2D -> ProjectionInput 'Perspective -> Transform Source #
spawnOrthoPixelsCentered :: (MonadReader (App GlobalHandles st) m, MonadResource m, MonadUnliftIO m) => m (ProjectionProcess 'Orthographic) Source #
mkTransformOrthoPixelsCentered :: Extent2D -> ProjectionInput 'Orthographic -> Transform Source #
spawnProjectionWith :: (MonadReader (App GlobalHandles st) m, MonadResource m, MonadUnliftIO m) => (Extent2D -> ProjectionInput pk -> Transform) -> ProjectionInput pk -> m (ProjectionProcess pk) Source #
spawnProjection :: (MonadReader (App GlobalHandles st) m, MonadResource m, MonadUnliftIO m) => (Extent2D -> ProjectionInput pk -> Transform) -> ProjectionParams pk -> m (ProjectionProcess pk) Source #
pattern PROJECTION_NEAR :: (Eq a, Num a, Fractional a) => a Source #
pattern PROJECTION_FAR :: (Eq a, Num a) => a Source #
View | |
|
type ViewProcess = Cell ViewOrbitalInput View Source #
data ViewOrbitalInput Source #
Camera orbiting its target
ViewOrbitalInput | |
|
Instances
Show ViewOrbitalInput Source # | |
Defined in Engine.Camera |
mkViewOrbital :: Vec3 -> ViewOrbitalInput -> View Source #