packages feed

geomancy-0.4.0.0: src/Geomancy/Swizzle/Vec/Down.hs

{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -Wno-orphans #-}

module Geomancy.Swizzle.Vec.Down () where

import GHC.Records (HasField(..))

import Geomancy.Vec2 (Vec2, vec2)
import Geomancy.Vec3 (Vec3, vec3, withVec3)
import Geomancy.Vec4 (Vec4, withVec4)

instance HasField "xx" Vec3 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec3 v \x _ _ -> vec2 x x

instance HasField "xy" Vec3 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec3 v \x y _ -> vec2 x y

instance HasField "xz" Vec3 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec3 v \x _ z -> vec2 x z

instance HasField "yx" Vec3 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec3 v \x y _ -> vec2 y x

instance HasField "yy" Vec3 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec3 v \_ y _ -> vec2 y y

instance HasField "yz" Vec3 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec3 v \_ y z -> vec2 y z

instance HasField "zx" Vec3 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec3 v \x _ z -> vec2 z x

instance HasField "zy" Vec3 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec3 v \_ y z -> vec2 z y

instance HasField "zz" Vec3 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec3 v \_ _ z -> vec2 z z

instance HasField "xx" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ _ _ -> vec2 x x

instance HasField "xy" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y _ _ -> vec2 x y

instance HasField "xz" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ z _ -> vec2 x z

instance HasField "xw" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ _ w -> vec2 x w

instance HasField "yx" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y _ _ -> vec2 y x

instance HasField "yy" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y _ _ -> vec2 y y

instance HasField "yz" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y z _ -> vec2 y z

instance HasField "yw" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y _ w -> vec2 y w

instance HasField "zx" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ z _ -> vec2 z x

instance HasField "zy" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y z _ -> vec2 z y

instance HasField "zz" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ _ z _ -> vec2 z z

instance HasField "zw" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ _ z w -> vec2 z w

instance HasField "wx" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ _ w -> vec2 w x

instance HasField "wy" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y _ w -> vec2 w y

instance HasField "wz" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ _ z w -> vec2 w z

instance HasField "ww" Vec4 Vec2 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ _ _ w -> vec2 w w

instance HasField "xxx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ _ _ -> vec3 x x x

instance HasField "xxy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y _ _ -> vec3 x x y

instance HasField "xxz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ z _ -> vec3 x x z

instance HasField "xxw" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ _ w -> vec3 x x w

instance HasField "xyx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y _ _ -> vec3 x y x

instance HasField "xyy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y _ _ -> vec3 x y y

instance HasField "xyz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y z _ -> vec3 x y z

instance HasField "xyw" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y _ w -> vec3 x y w

instance HasField "xzx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ z _ -> vec3 x z x

instance HasField "xzy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y z _ -> vec3 x z y

instance HasField "xzz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ z _ -> vec3 x z z

instance HasField "xzw" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ z w -> vec3 x z w

instance HasField "xwx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ _ w -> vec3 x w x

instance HasField "xwy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y _ w -> vec3 x w y

instance HasField "xwz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ z w -> vec3 x w z

instance HasField "xww" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ _ w -> vec3 x w w

instance HasField "yxx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y _ _ -> vec3 y x x

instance HasField "yxy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y _ _ -> vec3 y x y

instance HasField "yxz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y z _ -> vec3 y x z

instance HasField "yxw" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y _ w -> vec3 y x w

instance HasField "yyx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y _ _ -> vec3 y y x

instance HasField "yyy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y _ _ -> vec3 y y y

instance HasField "yyz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y z _ -> vec3 y y z

instance HasField "yyw" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y _ w -> vec3 y y w

instance HasField "yzx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y z _ -> vec3 y z x

instance HasField "yzy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y z _ -> vec3 y z y

instance HasField "yzz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y z _ -> vec3 y z z

instance HasField "yzw" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y z w -> vec3 y z w

instance HasField "ywx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y _ w -> vec3 y w x

instance HasField "ywy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y _ w -> vec3 y w y

instance HasField "ywz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y z w -> vec3 y w z

instance HasField "yww" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y _ w -> vec3 y w w

instance HasField "zxx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ z _ -> vec3 z x x

instance HasField "zxy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y z _ -> vec3 z x y

instance HasField "zxz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ z _ -> vec3 z x z

instance HasField "zxw" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ z w -> vec3 z x w

instance HasField "zyx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y z _ -> vec3 z y x

instance HasField "zyy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y z _ -> vec3 z y y

instance HasField "zyz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y z _ -> vec3 z y z

instance HasField "zyw" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y z w -> vec3 z y w

instance HasField "zzx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ z _ -> vec3 z z x

instance HasField "zzy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y z _ -> vec3 z z y

instance HasField "zzz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ _ z _ -> vec3 z z z

instance HasField "zzw" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ _ z w -> vec3 z z w

instance HasField "zwx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ z w -> vec3 z w x

instance HasField "zwy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y z w -> vec3 z w y

instance HasField "zwz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ _ z w -> vec3 z w z

instance HasField "zww" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ _ z w -> vec3 z w w

instance HasField "wxx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ _ w -> vec3 w x x

instance HasField "wxy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y _ w -> vec3 w x y

instance HasField "wxz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ z w -> vec3 w x z

instance HasField "wxw" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ _ w -> vec3 w x w

instance HasField "wyx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x y _ w -> vec3 w y x

instance HasField "wyy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y _ w -> vec3 w y y

instance HasField "wyz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y z w -> vec3 w y z

instance HasField "wyw" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y _ w -> vec3 w y w

instance HasField "wzx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ z w -> vec3 w z x

instance HasField "wzy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y z w -> vec3 w z y

instance HasField "wzz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ _ z w -> vec3 w z z

instance HasField "wzw" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ _ z w -> vec3 w z w

instance HasField "wwx" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \x _ _ w -> vec3 w w x

instance HasField "wwy" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ y _ w -> vec3 w w y

instance HasField "wwz" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ _ z w -> vec3 w w z

instance HasField "www" Vec4 Vec3 where
  {-# INLINE getField #-}
  getField v = withVec4 v \_ _ _ w -> vec3 w w w