Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Geometry is
- data Vertex is where
- data Triangle a = Triangle a a a
- mkGeometry :: (GLES, Attributes is) => [Triangle (Vertex is)] -> Geometry is
- mkGeometryInd :: (GLES, Attributes is) => [Vertex is] -> [Triangle Word16] -> Geometry is
- removeAttribute :: (RemoveAttr i is is', GLES) => (a -> i) -> Geometry is -> Geometry is'
- type Geometry2D = '[Position2, UV]
- type Geometry3D = '[Position3, UV, Normal3]
- positionOnly :: Geometry Geometry3D -> Geometry '[Position3]
- mkGeometry2D :: GLES => [Triangle (Vec2, Vec2)] -> Geometry Geometry2D
- mkGeometry3D :: GLES => [Triangle (Vec3, Vec2, Vec3)] -> Geometry Geometry3D
- mkGeometry2D' :: (GLES, Attributes (Append is Geometry2D)) => [Triangle (Vertex is, Vec2, Vec2)] -> Geometry (Append is Geometry2D)
- mkGeometry3D' :: (GLES, Attributes (Append is Geometry3D)) => [Triangle (Vertex is, Vec3, Vec2, Vec3)] -> Geometry (Append is Geometry3D)
- mkGeometry2DInd :: GLES => [(Vec2, Vec2)] -> [Triangle Word16] -> Geometry Geometry2D
- mkGeometry3DInd :: GLES => [(Vec3, Vec2, Vec3)] -> [Triangle Word16] -> Geometry Geometry3D
- mkGeometry2DInd' :: (GLES, Attributes (Append is Geometry2D)) => [(Vertex is, Vec2, Vec2)] -> [Triangle Word16] -> Geometry (Append is Geometry2D)
- mkGeometry3DInd' :: (GLES, Attributes (Append is Geometry3D)) => [(Vertex is, Vec3, Vec2, Vec3)] -> [Triangle Word16] -> Geometry (Append is Geometry3D)
Documentation
A set of attributes and indices.
A list of the attributes of a vertex.
For instance: Attr Position3 p :~ Attr UV u :~ Attr Normal3 n
mkGeometry :: (GLES, Attributes is) => [Triangle (Vertex is)] -> Geometry is Source #
Create a generic Geometry
.
mkGeometryInd :: (GLES, Attributes is) => [Vertex is] -> [Triangle Word16] -> Geometry is Source #
Create a Geometry
using a list of indices to a list of vertices. This
is faster than mkGeometry
.
:: (RemoveAttr i is is', GLES) | |
=> (a -> i) | Attribute constructor (or any other function with that type). |
-> Geometry is | |
-> Geometry is' |
Remove an attribute from a geometry.
2D and 3D geometries
type Geometry2D = '[Position2, UV] Source #
A 2D geometry.
positionOnly :: Geometry Geometry3D -> Geometry '[Position3] Source #
Remove the UV
and Normal3
attributes from a 3D Geometry.
Create a 2D Geometry
.
Create a 3D Geometry
.
mkGeometry2D' :: (GLES, Attributes (Append is Geometry2D)) => [Triangle (Vertex is, Vec2, Vec2)] -> Geometry (Append is Geometry2D) Source #
Create an extended 2D Geometry
.
mkGeometry3D' :: (GLES, Attributes (Append is Geometry3D)) => [Triangle (Vertex is, Vec3, Vec2, Vec3)] -> Geometry (Append is Geometry3D) Source #
Create an extended 3D Geometry
.
mkGeometry2DInd :: GLES => [(Vec2, Vec2)] -> [Triangle Word16] -> Geometry Geometry2D Source #
Create a 2D Geometry
using a list of indices.
mkGeometry3DInd :: GLES => [(Vec3, Vec2, Vec3)] -> [Triangle Word16] -> Geometry Geometry3D Source #
Create a 3D Geometry
using a list of indices.
mkGeometry2DInd' :: (GLES, Attributes (Append is Geometry2D)) => [(Vertex is, Vec2, Vec2)] -> [Triangle Word16] -> Geometry (Append is Geometry2D) Source #
Create an extended 2D Geometry
using a list of indices.
mkGeometry3DInd' :: (GLES, Attributes (Append is Geometry3D)) => [(Vertex is, Vec3, Vec2, Vec3)] -> [Triangle Word16] -> Geometry (Append is Geometry3D) Source #
Create an extended 3D Geometry
using a list of indices.