brick-3d-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Brick3D.Type

Synopsis

Basic type aliases

type Position = V3 Float Source #

Position in 3-Dimension

type Rotation = M33 Float Source #

Rotation in 3-Dimension

type DCPosition = V2 Float Source #

Position in Device Coordinate

Device coordnate is a Coordinate that put (0,0) on the center, and Y axis is positive above the center. X axis is positive on the right. The value have range of -1~1 and floating number(As shown in the Type definition)

type SCPosition = V2 Int Source #

Position in Screen Coordinate

Screen Coordinate is a Coordinate that is associated with actuall "pixel" of the screen. In this case, as we use Canvas for screen, (0, 0) is set at the Top-Left corner.

type Normal = V3 Float Source #

Normal of some 3-Dimensional object

Vertices

data Vertex Source #

One Vertex in 3D coordinate

Constructors

Vertex Position 

Instances

Instances details
Eq Vertex Source # 
Instance details

Defined in Brick3D.Type

Methods

(==) :: Vertex -> Vertex -> Bool #

(/=) :: Vertex -> Vertex -> Bool #

Ord Vertex Source # 
Instance details

Defined in Brick3D.Type

Show Vertex Source # 
Instance details

Defined in Brick3D.Type

data DCVertex Source #

Vertex that is mapped to Device Coordinate

Constructors

DCVertex DCPosition Float 

Instances

Instances details
Eq DCVertex Source # 
Instance details

Defined in Brick3D.Type

Ord DCVertex Source # 
Instance details

Defined in Brick3D.Type

Show DCVertex Source # 
Instance details

Defined in Brick3D.Type

data SCVertex Source #

A vertex on Screen Coordinate.

Constructors

SCVertex SCPosition Float 

Instances

Instances details
Eq SCVertex Source # 
Instance details

Defined in Brick3D.Type

Ord SCVertex Source # 
Instance details

Defined in Brick3D.Type

Show SCVertex Source # 
Instance details

Defined in Brick3D.Type

Primitives

data PrimitiveBase vtype Source #

Define Primitive shapes. This would

Constructors

Point vtype 
Triangle vtype vtype vtype

Line (Vector vtype)

Instances

Instances details
Eq vtype => Eq (PrimitiveBase vtype) Source # 
Instance details

Defined in Brick3D.Type

Methods

(==) :: PrimitiveBase vtype -> PrimitiveBase vtype -> Bool #

(/=) :: PrimitiveBase vtype -> PrimitiveBase vtype -> Bool #

Ord vtype => Ord (PrimitiveBase vtype) Source # 
Instance details

Defined in Brick3D.Type

Methods

compare :: PrimitiveBase vtype -> PrimitiveBase vtype -> Ordering #

(<) :: PrimitiveBase vtype -> PrimitiveBase vtype -> Bool #

(<=) :: PrimitiveBase vtype -> PrimitiveBase vtype -> Bool #

(>) :: PrimitiveBase vtype -> PrimitiveBase vtype -> Bool #

(>=) :: PrimitiveBase vtype -> PrimitiveBase vtype -> Bool #

max :: PrimitiveBase vtype -> PrimitiveBase vtype -> PrimitiveBase vtype #

min :: PrimitiveBase vtype -> PrimitiveBase vtype -> PrimitiveBase vtype #

Show vtype => Show (PrimitiveBase vtype) Source # 
Instance details

Defined in Brick3D.Type

Methods

showsPrec :: Int -> PrimitiveBase vtype -> ShowS #

show :: PrimitiveBase vtype -> String #

showList :: [PrimitiveBase vtype] -> ShowS #

type Primitive = PrimitiveBase Vertex Source #

Primitive shape that in 3D world

data DCPrimitive Source #

Primitive that is shaded on Device Coordinate

Utility functions