blob: 0eb09f44a17ba72b956ac1564a6fad5dc3f3ed5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
-----------------------------------------------------------------------------
-- |
-- Copyright : (C) 2015 Dimitri Sabadie
-- License : BSD3
--
-- Maintainer : Dimitri Sabadie <dimitri.sabadie@gmail.com>
-- Stability : experimental
-- Portability : portable
--
-----------------------------------------------------------------------------
module Codec.Wavefront.TexCoord where
-- |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.
data TexCoord = TexCoord {
texcoordR :: {-# UNPACK #-} !Float
, texcoordS :: {-# UNPACK #-} !Float
, texcoordT :: {-# UNPACK #-} !Float
} deriving (Eq,Show)
-- |A parameter-space coordinate is a 3D-floating vector. You can access to its components by pattern
-- matching on them:
--
-- @
-- let ParamCoord r s t = ParamCoord 0.1 0.2 0.3
-- @
--
-- That type is strict and unboxed.
data ParamCoord = ParamCoord {
paramcoordR :: {-# UNPACK #-} !Float
, paramcoordS :: {-# UNPACK #-} !Float
, paramcoordT :: {-# UNPACK #-} !Float
} deriving (Eq,Show)
|