wavefront
Copyright(C) 2015 Dimitri Sabadie
LicenseBSD3
MaintainerDimitri Sabadie <dimitri.sabadie@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Codec.Wavefront

Description

Currently, you can parse a file and get a WavefrontOBJ with the fromFile function.

Synopsis

Vertex location

data Location Source #

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.

Constructors

Location 

Fields

Instances

Instances details
Generic Location Source # 
Instance details

Defined in Codec.Wavefront.Location

Associated Types

type Rep Location 
Instance details

Defined in Codec.Wavefront.Location

type Rep Location = D1 ('MetaData "Location" "Codec.Wavefront.Location" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "Location" 'PrefixI 'True) ((S1 ('MetaSel ('Just "locX") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float) :*: S1 ('MetaSel ('Just "locY") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float)) :*: (S1 ('MetaSel ('Just "locZ") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float) :*: S1 ('MetaSel ('Just "locW") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float))))
Show Location Source # 
Instance details

Defined in Codec.Wavefront.Location

Eq Location Source # 
Instance details

Defined in Codec.Wavefront.Location

type Rep Location Source # 
Instance details

Defined in Codec.Wavefront.Location

type Rep Location = D1 ('MetaData "Location" "Codec.Wavefront.Location" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "Location" 'PrefixI 'True) ((S1 ('MetaSel ('Just "locX") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float) :*: S1 ('MetaSel ('Just "locY") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float)) :*: (S1 ('MetaSel ('Just "locZ") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float) :*: S1 ('MetaSel ('Just "locW") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float))))

Vertex texture coordinates

data TexCoord Source #

A texture coordinate is a 3D-floating vector. You can access to its components by pattern matching on them:

  let TexCoord r s t = TexCoord 0.1 0.2 0.3

That type is strict and unboxed.

Constructors

TexCoord 

Instances

Instances details
Generic TexCoord Source # 
Instance details

Defined in Codec.Wavefront.TexCoord

Associated Types

type Rep TexCoord 
Instance details

Defined in Codec.Wavefront.TexCoord

type Rep TexCoord = D1 ('MetaData "TexCoord" "Codec.Wavefront.TexCoord" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "TexCoord" 'PrefixI 'True) (S1 ('MetaSel ('Just "texcoordR") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float) :*: (S1 ('MetaSel ('Just "texcoordS") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float) :*: S1 ('MetaSel ('Just "texcoordT") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float))))
Show TexCoord Source # 
Instance details

Defined in Codec.Wavefront.TexCoord

Eq TexCoord Source # 
Instance details

Defined in Codec.Wavefront.TexCoord

type Rep TexCoord Source # 
Instance details

Defined in Codec.Wavefront.TexCoord

type Rep TexCoord = D1 ('MetaData "TexCoord" "Codec.Wavefront.TexCoord" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "TexCoord" 'PrefixI 'True) (S1 ('MetaSel ('Just "texcoordR") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float) :*: (S1 ('MetaSel ('Just "texcoordS") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float) :*: S1 ('MetaSel ('Just "texcoordT") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float))))

Vertex normals

data Normal Source #

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.

Constructors

Normal 

Fields

Instances

Instances details
Show Normal Source # 
Instance details

Defined in Codec.Wavefront.Normal

Eq Normal Source # 
Instance details

Defined in Codec.Wavefront.Normal

Points

data Point Source #

A point is a single index that references the locations. It’s a canonical type that truly represents a polygonal point.

Constructors

Point 

Fields

Instances

Instances details
Generic Point Source # 
Instance details

Defined in Codec.Wavefront.Point

Associated Types

type Rep Point 
Instance details

Defined in Codec.Wavefront.Point

type Rep Point = D1 ('MetaData "Point" "Codec.Wavefront.Point" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "Point" 'PrefixI 'True) (S1 ('MetaSel ('Just "pointLocIndex") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int)))

Methods

from :: Point -> Rep Point x Source #

to :: Rep Point x -> Point Source #

Show Point Source # 
Instance details

Defined in Codec.Wavefront.Point

Eq Point Source # 
Instance details

Defined in Codec.Wavefront.Point

Methods

(==) :: Point -> Point -> Bool Source #

(/=) :: Point -> Point -> Bool Source #

type Rep Point Source # 
Instance details

Defined in Codec.Wavefront.Point

type Rep Point = D1 ('MetaData "Point" "Codec.Wavefront.Point" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "Point" 'PrefixI 'True) (S1 ('MetaSel ('Just "pointLocIndex") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int)))

Lines

data Line Source #

Constructors

Line 

Instances

Instances details
Generic Line Source # 
Instance details

Defined in Codec.Wavefront.Line

Associated Types

type Rep Line 
Instance details

Defined in Codec.Wavefront.Line

type Rep Line = D1 ('MetaData "Line" "Codec.Wavefront.Line" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "Line" 'PrefixI 'True) (S1 ('MetaSel ('Just "lineIndexA") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LineIndex) :*: S1 ('MetaSel ('Just "lineIndexB") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LineIndex)))

Methods

from :: Line -> Rep Line x Source #

to :: Rep Line x -> Line Source #

Show Line Source # 
Instance details

Defined in Codec.Wavefront.Line

Eq Line Source # 
Instance details

Defined in Codec.Wavefront.Line

Methods

(==) :: Line -> Line -> Bool Source #

(/=) :: Line -> Line -> Bool Source #

type Rep Line Source # 
Instance details

Defined in Codec.Wavefront.Line

type Rep Line = D1 ('MetaData "Line" "Codec.Wavefront.Line" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "Line" 'PrefixI 'True) (S1 ('MetaSel ('Just "lineIndexA") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LineIndex) :*: S1 ('MetaSel ('Just "lineIndexB") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LineIndex)))

data LineIndex Source #

A line index is a pair of indices. LineIndex vi vti. vi references the locations and vti indexes the texture coordinates. If vti == Nothing, then that LineIndex doesn’t have texture coordinates associated with.

Constructors

LineIndex 

Instances

Instances details
Generic LineIndex Source # 
Instance details

Defined in Codec.Wavefront.Line

Associated Types

type Rep LineIndex 
Instance details

Defined in Codec.Wavefront.Line

type Rep LineIndex = D1 ('MetaData "LineIndex" "Codec.Wavefront.Line" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "LineIndex" 'PrefixI 'True) (S1 ('MetaSel ('Just "lineLocIndex") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "lineTexCoordIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Int))))
Show LineIndex Source # 
Instance details

Defined in Codec.Wavefront.Line

Eq LineIndex Source # 
Instance details

Defined in Codec.Wavefront.Line

type Rep LineIndex Source # 
Instance details

Defined in Codec.Wavefront.Line

type Rep LineIndex = D1 ('MetaData "LineIndex" "Codec.Wavefront.Line" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "LineIndex" 'PrefixI 'True) (S1 ('MetaSel ('Just "lineLocIndex") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "lineTexCoordIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Int))))

Faces

data Face Source #

A face gathers several FaceIndex to build up faces. It has a least three vertices

Instances

Instances details
Generic Face Source # 
Instance details

Defined in Codec.Wavefront.Face

Methods

from :: Face -> Rep Face x Source #

to :: Rep Face x -> Face Source #

Show Face Source # 
Instance details

Defined in Codec.Wavefront.Face

Eq Face Source # 
Instance details

Defined in Codec.Wavefront.Face

Methods

(==) :: Face -> Face -> Bool Source #

(/=) :: Face -> Face -> Bool Source #

type Rep Face Source # 
Instance details

Defined in Codec.Wavefront.Face

data FaceIndex Source #

A face index is a triplet of indices. FaceIndex vi vti vni is a face that indexes the locations with vi, the texture coordinates with vti and the normals with vni. An index set to Nothing means no information. That is, if vni == Nothing, then that FaceIndex doesn’t have a normal associated with.

Constructors

FaceIndex 

Instances

Instances details
Generic FaceIndex Source # 
Instance details

Defined in Codec.Wavefront.Face

Associated Types

type Rep FaceIndex 
Instance details

Defined in Codec.Wavefront.Face

type Rep FaceIndex = D1 ('MetaData "FaceIndex" "Codec.Wavefront.Face" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "FaceIndex" 'PrefixI 'True) (S1 ('MetaSel ('Just "faceLocIndex") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "faceTexCoordIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "faceNorIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Int)))))
Show FaceIndex Source # 
Instance details

Defined in Codec.Wavefront.Face

Eq FaceIndex Source # 
Instance details

Defined in Codec.Wavefront.Face

type Rep FaceIndex Source # 
Instance details

Defined in Codec.Wavefront.Face

type Rep FaceIndex = D1 ('MetaData "FaceIndex" "Codec.Wavefront.Face" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "FaceIndex" 'PrefixI 'True) (S1 ('MetaSel ('Just "faceLocIndex") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "faceTexCoordIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "faceNorIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Int)))))

Element

type Element = ElementF (Maybe Material) Source #

An element whose material has been dereferenced.

data ElementF material a Source #

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.

Constructors

Element 

Fields

Instances

Instances details
Bifoldable ElementF Source # 
Instance details

Defined in Codec.Wavefront.Element

Methods

bifold :: Monoid m => ElementF m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> ElementF a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> ElementF a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> ElementF a b -> c Source #

Bifunctor ElementF Source # 
Instance details

Defined in Codec.Wavefront.Element

Methods

bimap :: (a -> b) -> (c -> d) -> ElementF a c -> ElementF b d Source #

first :: (a -> b) -> ElementF a c -> ElementF b c Source #

second :: (b -> c) -> ElementF a b -> ElementF a c Source #

Bitraversable ElementF Source # 
Instance details

Defined in Codec.Wavefront.Element

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> ElementF a b -> f (ElementF c d) Source #

Functor (ElementF material) Source # 
Instance details

Defined in Codec.Wavefront.Element

Methods

fmap :: (a -> b) -> ElementF material a -> ElementF material b Source #

(<$) :: a -> ElementF material b -> ElementF material a Source #

Foldable (ElementF material) Source # 
Instance details

Defined in Codec.Wavefront.Element

Methods

fold :: Monoid m => ElementF material m -> m Source #

foldMap :: Monoid m => (a -> m) -> ElementF material a -> m Source #

foldMap' :: Monoid m => (a -> m) -> ElementF material a -> m Source #

foldr :: (a -> b -> b) -> b -> ElementF material a -> b Source #

foldr' :: (a -> b -> b) -> b -> ElementF material a -> b Source #

foldl :: (b -> a -> b) -> b -> ElementF material a -> b Source #

foldl' :: (b -> a -> b) -> b -> ElementF material a -> b Source #

foldr1 :: (a -> a -> a) -> ElementF material a -> a Source #

foldl1 :: (a -> a -> a) -> ElementF material a -> a Source #

toList :: ElementF material a -> [a] Source #

null :: ElementF material a -> Bool Source #

length :: ElementF material a -> Int Source #

elem :: Eq a => a -> ElementF material a -> Bool Source #

maximum :: Ord a => ElementF material a -> a Source #

minimum :: Ord a => ElementF material a -> a Source #

sum :: Num a => ElementF material a -> a Source #

product :: Num a => ElementF material a -> a Source #

Traversable (ElementF material) Source # 
Instance details

Defined in Codec.Wavefront.Element

Methods

traverse :: Applicative f => (a -> f b) -> ElementF material a -> f (ElementF material b) Source #

sequenceA :: Applicative f => ElementF material (f a) -> f (ElementF material a) Source #

mapM :: Monad m => (a -> m b) -> ElementF material a -> m (ElementF material b) Source #

sequence :: Monad m => ElementF material (m a) -> m (ElementF material a) Source #

Generic (ElementF material a) Source # 
Instance details

Defined in Codec.Wavefront.Element

Associated Types

type Rep (ElementF material a) 
Instance details

Defined in Codec.Wavefront.Element

type Rep (ElementF material a) = D1 ('MetaData "ElementF" "Codec.Wavefront.Element" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "Element" 'PrefixI 'True) ((S1 ('MetaSel ('Just "elObject") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "elGroups") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text])) :*: (S1 ('MetaSel ('Just "elMtl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 material) :*: (S1 ('MetaSel ('Just "elSmoothingGroup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "elValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))

Methods

from :: ElementF material a -> Rep (ElementF material a) x Source #

to :: Rep (ElementF material a) x -> ElementF material a Source #

(Show material, Show a) => Show (ElementF material a) Source # 
Instance details

Defined in Codec.Wavefront.Element

Methods

showsPrec :: Int -> ElementF material a -> ShowS Source #

show :: ElementF material a -> String Source #

showList :: [ElementF material a] -> ShowS Source #

(Eq material, Eq a) => Eq (ElementF material a) Source # 
Instance details

Defined in Codec.Wavefront.Element

Methods

(==) :: ElementF material a -> ElementF material a -> Bool Source #

(/=) :: ElementF material a -> ElementF material a -> Bool Source #

type Rep (ElementF material a) Source # 
Instance details

Defined in Codec.Wavefront.Element

type Rep (ElementF material a) = D1 ('MetaData "ElementF" "Codec.Wavefront.Element" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "Element" 'PrefixI 'True) ((S1 ('MetaSel ('Just "elObject") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "elGroups") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text])) :*: (S1 ('MetaSel ('Just "elMtl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 material) :*: (S1 ('MetaSel ('Just "elSmoothingGroup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "elValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))

type RawElement = ElementF (Maybe Text) Source #

An element whose material has not been dereferenced yet

Object

type WavefrontOBJ = WavefrontOBJF MaterialLib (Maybe Material) Source #

The content of a WavefrontOBJ file, in which the materials have been dereferenced.

data WavefrontOBJF mtlLib material Source #

Prototype result for a WaveFrontOBJ File

Note according to the OBJ-spec, locations are "1-indexed"; i.e. in the range [1..n] rather than [0..n-1]. Hence, the indices in the Points, Lines, and Faces all refer to these 1-indexed points.

Constructors

WavefrontOBJ 

Fields

Instances

Instances details
Generic (WavefrontOBJF mtlLib material) Source # 
Instance details

Defined in Codec.Wavefront.Object

Associated Types

type Rep (WavefrontOBJF mtlLib material) 
Instance details

Defined in Codec.Wavefront.Object

type Rep (WavefrontOBJF mtlLib material) = D1 ('MetaData "WavefrontOBJF" "Codec.Wavefront.Object" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "WavefrontOBJ" 'PrefixI 'True) ((S1 ('MetaSel ('Just "objLocations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Location)) :*: (S1 ('MetaSel ('Just "objTexCoords") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector TexCoord)) :*: S1 ('MetaSel ('Just "objNormals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Normal)))) :*: ((S1 ('MetaSel ('Just "objPoints") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector (ElementF material Point))) :*: S1 ('MetaSel ('Just "objLines") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector (ElementF material Line)))) :*: (S1 ('MetaSel ('Just "objFaces") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector (ElementF material Face))) :*: S1 ('MetaSel ('Just "objMtlLibs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector mtlLib))))))

Methods

from :: WavefrontOBJF mtlLib material -> Rep (WavefrontOBJF mtlLib material) x Source #

to :: Rep (WavefrontOBJF mtlLib material) x -> WavefrontOBJF mtlLib material Source #

(Show material, Show mtlLib) => Show (WavefrontOBJF mtlLib material) Source # 
Instance details

Defined in Codec.Wavefront.Object

Methods

showsPrec :: Int -> WavefrontOBJF mtlLib material -> ShowS Source #

show :: WavefrontOBJF mtlLib material -> String Source #

showList :: [WavefrontOBJF mtlLib material] -> ShowS Source #

(Eq material, Eq mtlLib) => Eq (WavefrontOBJF mtlLib material) Source # 
Instance details

Defined in Codec.Wavefront.Object

Methods

(==) :: WavefrontOBJF mtlLib material -> WavefrontOBJF mtlLib material -> Bool Source #

(/=) :: WavefrontOBJF mtlLib material -> WavefrontOBJF mtlLib material -> Bool Source #

type Rep (WavefrontOBJF mtlLib material) Source # 
Instance details

Defined in Codec.Wavefront.Object

type Rep (WavefrontOBJF mtlLib material) = D1 ('MetaData "WavefrontOBJF" "Codec.Wavefront.Object" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "WavefrontOBJ" 'PrefixI 'True) ((S1 ('MetaSel ('Just "objLocations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Location)) :*: (S1 ('MetaSel ('Just "objTexCoords") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector TexCoord)) :*: S1 ('MetaSel ('Just "objNormals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Normal)))) :*: ((S1 ('MetaSel ('Just "objPoints") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector (ElementF material Point))) :*: S1 ('MetaSel ('Just "objLines") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector (ElementF material Line)))) :*: (S1 ('MetaSel ('Just "objFaces") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector (ElementF material Face))) :*: S1 ('MetaSel ('Just "objMtlLibs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector mtlLib))))))

type RawWavefrontOBJ = WavefrontOBJF FilePath (Maybe Text) Source #

A wavefront object whose material has not been dereferenced yet

Material

data MaterialLib Source #

A MaterialLib

Instances

Instances details
Generic MaterialLib Source # 
Instance details

Defined in Codec.Wavefront.Material

Associated Types

type Rep MaterialLib 
Instance details

Defined in Codec.Wavefront.Material

type Rep MaterialLib = D1 ('MetaData "MaterialLib" "Codec.Wavefront.Material" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "MaterialLib" 'PrefixI 'True) (S1 ('MetaSel ('Just "materialLibPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "materials") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map MaterialName Material))))
Show MaterialLib Source # 
Instance details

Defined in Codec.Wavefront.Material

Eq MaterialLib Source # 
Instance details

Defined in Codec.Wavefront.Material

type Rep MaterialLib Source # 
Instance details

Defined in Codec.Wavefront.Material

type Rep MaterialLib = D1 ('MetaData "MaterialLib" "Codec.Wavefront.Material" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "MaterialLib" 'PrefixI 'True) (S1 ('MetaSel ('Just "materialLibPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "materials") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map MaterialName Material))))

data Material Source #

Specification of a Material

Instances

Instances details
Generic Material Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

Associated Types

type Rep Material 
Instance details

Defined in Codec.Wavefront.Material.Type

type Rep Material = D1 ('MetaData "Material" "Codec.Wavefront.Material.Type" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "Material" 'PrefixI 'True) (((S1 ('MetaSel ('Just "materialName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MaterialName) :*: S1 ('MetaSel ('Just "ambientReflexivity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Reflexivity))) :*: (S1 ('MetaSel ('Just "diffuseReflexivity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Reflexivity)) :*: (S1 ('MetaSel ('Just "specularReflexivity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Reflexivity)) :*: S1 ('MetaSel ('Just "emissiveReflexivity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Reflexivity))))) :*: ((S1 ('MetaSel ('Just "transmissionFilter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Reflexivity)) :*: (S1 ('MetaSel ('Just "iluminationModel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe IluminationModel)) :*: S1 ('MetaSel ('Just "disolveFactor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Float)))) :*: (S1 ('MetaSel ('Just "specularExponent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Float)) :*: (S1 ('MetaSel ('Just "sharpness") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Float)) :*: S1 ('MetaSel ('Just "opticalDensity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Float)))))))
Show Material Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

Eq Material Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

type Rep Material Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

type Rep Material = D1 ('MetaData "Material" "Codec.Wavefront.Material.Type" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "Material" 'PrefixI 'True) (((S1 ('MetaSel ('Just "materialName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MaterialName) :*: S1 ('MetaSel ('Just "ambientReflexivity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Reflexivity))) :*: (S1 ('MetaSel ('Just "diffuseReflexivity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Reflexivity)) :*: (S1 ('MetaSel ('Just "specularReflexivity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Reflexivity)) :*: S1 ('MetaSel ('Just "emissiveReflexivity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Reflexivity))))) :*: ((S1 ('MetaSel ('Just "transmissionFilter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Reflexivity)) :*: (S1 ('MetaSel ('Just "iluminationModel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe IluminationModel)) :*: S1 ('MetaSel ('Just "disolveFactor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Float)))) :*: (S1 ('MetaSel ('Just "specularExponent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Float)) :*: (S1 ('MetaSel ('Just "sharpness") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Float)) :*: S1 ('MetaSel ('Just "opticalDensity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Float)))))))

Attributes of Materials

data RGB Source #

Constructors

RGB !Float !Float !Float 

Instances

Instances details
Generic RGB Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

Associated Types

type Rep RGB 
Instance details

Defined in Codec.Wavefront.Material.Type

Methods

from :: RGB -> Rep RGB x Source #

to :: Rep RGB x -> RGB Source #

Show RGB Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

Eq RGB Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

Methods

(==) :: RGB -> RGB -> Bool Source #

(/=) :: RGB -> RGB -> Bool Source #

type Rep RGB Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

data CIEXYZ Source #

Constructors

CIEXYZ !Float !Float !Float 

Instances

Instances details
Generic CIEXYZ Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

Associated Types

type Rep CIEXYZ 
Instance details

Defined in Codec.Wavefront.Material.Type

type Rep CIEXYZ = D1 ('MetaData "CIEXYZ" "Codec.Wavefront.Material.Type" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "CIEXYZ" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float))))
Show CIEXYZ Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

Eq CIEXYZ Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

type Rep CIEXYZ Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

type Rep CIEXYZ = D1 ('MetaData "CIEXYZ" "Codec.Wavefront.Material.Type" "wavefront-0.7.1.5-inplace" 'False) (C1 ('MetaCons "CIEXYZ" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Float))))

data Reflexivity Source #

Instances

Instances details
Generic Reflexivity Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

Associated Types

type Rep Reflexivity 
Instance details

Defined in Codec.Wavefront.Material.Type

Show Reflexivity Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

Eq Reflexivity Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

type Rep Reflexivity Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

data IluminationModel Source #

Instances

Instances details
Bounded IluminationModel Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

Enum IluminationModel Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

Generic IluminationModel Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

Associated Types

type Rep IluminationModel 
Instance details

Defined in Codec.Wavefront.Material.Type

type Rep IluminationModel = D1 ('MetaData "IluminationModel" "Codec.Wavefront.Material.Type" "wavefront-0.7.1.5-inplace" 'False) (((C1 ('MetaCons "ColorOnly" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ColorAndAmbient" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Higlight" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ReflectionAndRayTrace" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GlassAndRayTrace" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "FresnelAndRayTrace" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RefractionAndRayTrace" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RefactionFresnelAndRayTrace" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ReflectionOnly" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GlassOnly" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CastsShadows" 'PrefixI 'False) (U1 :: Type -> Type)))))
Show IluminationModel Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

Eq IluminationModel Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

type Rep IluminationModel Source # 
Instance details

Defined in Codec.Wavefront.Material.Type

type Rep IluminationModel = D1 ('MetaData "IluminationModel" "Codec.Wavefront.Material.Type" "wavefront-0.7.1.5-inplace" 'False) (((C1 ('MetaCons "ColorOnly" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ColorAndAmbient" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Higlight" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ReflectionAndRayTrace" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GlassAndRayTrace" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "FresnelAndRayTrace" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RefractionAndRayTrace" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RefactionFresnelAndRayTrace" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ReflectionOnly" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GlassOnly" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CastsShadows" 'PrefixI 'False) (U1 :: Type -> Type)))))

Re-exports