-----------------------------------------------------------------------------
-- |
-- Copyright   : (C) 2015 Dimitri Sabadie
-- License     : BSD3
--
-- Maintainer  : Dimitri Sabadie <dimitri.sabadie@gmail.com>
-- Stability   : experimental
-- Portability : portable
--
-----------------------------------------------------------------------------

module Codec.Wavefront.Normal where

-- |A normal is a 3-floating vector. You can access to its components by pattern matching on them:
--
-- @
--   let Normal nx ny nz = Normal 0.1 0.2 0.3
-- @
--
-- That type is strict and unboxed.
data Normal = Normal {
    Normal -> Float
norX :: {-# UNPACK #-} !Float
  , Normal -> Float
norY :: {-# UNPACK #-} !Float
  , Normal -> Float
norZ :: {-# UNPACK #-} !Float
  } deriving (Normal -> Normal -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Normal -> Normal -> Bool
$c/= :: Normal -> Normal -> Bool
== :: Normal -> Normal -> Bool
$c== :: Normal -> Normal -> Bool
Eq,Int -> Normal -> ShowS
[Normal] -> ShowS
Normal -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Normal] -> ShowS
$cshowList :: [Normal] -> ShowS
show :: Normal -> String
$cshow :: Normal -> String
showsPrec :: Int -> Normal -> ShowS
$cshowsPrec :: Int -> Normal -> ShowS
Show)