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

module Codec.Wavefront.Location where

-- |A location is a 4-floating vector. You can access to its components by pattern matching on them:
--
-- @
--   let Location x y z w = Location 1 2 3 4
-- @
--
-- That type is strict and unboxed.
data Location = Location {
    Location -> Float
locX :: {-# UNPACK #-} !Float
  , Location -> Float
locY :: {-# UNPACK #-} !Float
  , Location -> Float
locZ :: {-# UNPACK #-} !Float
  , Location -> Float
locW :: {-# UNPACK #-} !Float
  } deriving (Location -> Location -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Location -> Location -> Bool
$c/= :: Location -> Location -> Bool
== :: Location -> Location -> Bool
$c== :: Location -> Location -> Bool
Eq,Int -> Location -> ShowS
[Location] -> ShowS
Location -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Location] -> ShowS
$cshowList :: [Location] -> ShowS
show :: Location -> String
$cshow :: Location -> String
showsPrec :: Int -> Location -> ShowS
$cshowsPrec :: Int -> Location -> ShowS
Show)