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

module Codec.Wavefront.Element (
    -- * Element
    Element(..)
  ) where

import Data.Text ( Text )
import Numeric.Natural ( Natural )

-- |An element holds a value along with the user-defined object’s name (if any), the associated
-- groups, the used material and the smoothing group the element belongs to (if any). Those values
-- can be used to sort the data per object or per group and to lookup materials.
data Element a = Element {
    forall a. Element a -> Maybe Text
elObject :: Maybe Text
  , forall a. Element a -> [Text]
elGroups :: [Text]
  , forall a. Element a -> Maybe Text
elMtl :: Maybe Text
  , forall a. Element a -> Natural
elSmoothingGroup :: Natural
  , forall a. Element a -> a
elValue :: a
  } deriving (Element a -> Element a -> Bool
forall a. Eq a => Element a -> Element a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Element a -> Element a -> Bool
$c/= :: forall a. Eq a => Element a -> Element a -> Bool
== :: Element a -> Element a -> Bool
$c== :: forall a. Eq a => Element a -> Element a -> Bool
Eq,Int -> Element a -> ShowS
forall a. Show a => Int -> Element a -> ShowS
forall a. Show a => [Element a] -> ShowS
forall a. Show a => Element a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Element a] -> ShowS
$cshowList :: forall a. Show a => [Element a] -> ShowS
show :: Element a -> String
$cshow :: forall a. Show a => Element a -> String
showsPrec :: Int -> Element a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> Element a -> ShowS
Show)