Safe Haskell | None |
---|---|
Language | Haskell2010 |
- len :: forall n. Veccable n => Vec n -> Vec1
- distance :: forall n. Veccable n => Vec n -> Vec n -> Vec n
- cross :: Vec3 -> Vec3 -> Vec3
- normalize :: forall n. Veccable n => Vec n -> Vec n
- faceForward :: forall n. Veccable n => Vec n -> Vec n -> Vec n -> Vec n
- reflect :: forall n. Veccable n => Vec n -> Vec n -> Vec n
- refract :: forall n. Veccable n => Vec n -> Vec n -> Vec1 -> Vec n
- inverseSqrt :: forall n. Veccable n => Vec n -> Vec n
- fract :: forall n. Veccable n => Vec n -> Vec n
- mod_ :: forall n. Veccable n => Vec n -> Vec n -> Vec n
- floor_ :: forall n. Veccable n => Vec n -> Vec n
- ceil_ :: forall n. Veccable n => Vec n -> Vec n
- min_ :: forall n. Veccable n => Vec n -> Vec n -> Vec n
- max_ :: forall n. Veccable n => Vec n -> Vec n -> Vec n
- clamp :: forall n. Veccable n => Vec n -> Vec n -> Vec n -> Vec n
- mix :: Veccable n => Vec1 -> Vec n -> Vec n -> Vec n
- true :: Booly
- false :: Booly
- bcomp :: Veccable v => String -> Vec v -> Vec v -> Booly
- eq :: Veccable v => Vec v -> Vec v -> Booly
- neq :: Veccable v => Vec v -> Vec v -> Booly
- lt :: Veccable v => Vec v -> Vec v -> Booly
- gt :: Veccable v => Vec v -> Vec v -> Booly
- leq :: Veccable v => Vec v -> Vec v -> Booly
- geq :: Veccable v => Vec v -> Vec v -> Booly
- texture2D :: Texture -> Vec2 -> Vec4
- sel :: forall a. ToGLSLType a => Booly -> Expr a -> Expr a -> Expr a
Documentation
distance :: forall n. Veccable n => Vec n -> Vec n -> Vec n Source
Euclidean distance between two points
faceForward :: forall n. Veccable n => Vec n -> Vec n -> Vec n -> Vec n Source
Returns a vector pointing in the same direction as another
faceforward toOrient incident reference -- == oriented
reflect :: forall n. Veccable n => Vec n -> Vec n -> Vec n Source
Calculates the reflection direction for an incident vector
reflect incident normal -- == reflected
refract :: forall n. Veccable n => Vec n -> Vec n -> Vec1 -> Vec n Source
Calculates the refraction direction direction for an incident vector
refract incident normal eta -- == reflected
where eta is the ratio of indicies of refraction
inverseSqrt :: forall n. Veccable n => Vec n -> Vec n Source
clamp :: forall n. Veccable n => Vec n -> Vec n -> Vec n -> Vec n Source
Clamps x between min and max
clamp min max x -- == clamped
mix :: Veccable n => Vec1 -> Vec n -> Vec n -> Vec n Source
Linear interpolation between x and y by p, a Vec1 from 0 to 1
mix p x y = x ^* (1 - p) + y ^* p -- mix 0 x y == x -- mix 1 x y == y