hOff-parser-0.1.0.0: The parser to parser the OFF(Object File Format, Princeton ModelNet).

Copyright(C) Johann Lee <me@qinka.pro> 2017
LicenseGPL-3
Maintainerme@qinka.pro
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

HOff.Parser.Types

Contents

Description

The types are used in parser.

Synopsis

Types of OFF

data OFF a b Source #

Basic format of file It will include only the vertices and faces. a is type for Vertice b is type for faces' index For example, type SimpleOFF = OFF [] Float.

Constructors

OFF [Vertice a] [Face b] 

Instances

(Eq b, Eq a) => Eq (OFF a b) Source # 

Methods

(==) :: OFF a b -> OFF a b -> Bool #

(/=) :: OFF a b -> OFF a b -> Bool #

(Show b, Show a) => Show (OFF a b) Source # 

Methods

showsPrec :: Int -> OFF a b -> ShowS #

show :: OFF a b -> String #

showList :: [OFF a b] -> ShowS #

data Vertice a Source #

Vertices of OFF in x, y, z coordinate. a is type of value

Constructors

Vertice (a, a, a) 

Instances

Eq a => Eq (Vertice a) Source # 

Methods

(==) :: Vertice a -> Vertice a -> Bool #

(/=) :: Vertice a -> Vertice a -> Bool #

Ord a => Ord (Vertice a) Source # 

Methods

compare :: Vertice a -> Vertice a -> Ordering #

(<) :: Vertice a -> Vertice a -> Bool #

(<=) :: Vertice a -> Vertice a -> Bool #

(>) :: Vertice a -> Vertice a -> Bool #

(>=) :: Vertice a -> Vertice a -> Bool #

max :: Vertice a -> Vertice a -> Vertice a #

min :: Vertice a -> Vertice a -> Vertice a #

Show a => Show (Vertice a) Source # 

Methods

showsPrec :: Int -> Vertice a -> ShowS #

show :: Vertice a -> String #

showList :: [Vertice a] -> ShowS #

data Face a Source #

Face of OFF store the index of every vertices. l is vector should be * -> *, and it will be used as array, or say vector. a is type of value

Constructors

Face [a] 

Instances

Eq a => Eq (Face a) Source # 

Methods

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

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

Show a => Show (Face a) Source # 

Methods

showsPrec :: Int -> Face a -> ShowS #

show :: Face a -> String #

showList :: [Face a] -> ShowS #

data ParStat Source #

Status of parser. To get number of vertices and faces.

Constructors

ParStat 

Fields

Functions

offVertice Source #

Arguments

:: OFF a b

OFF

-> [Vertice a]

Vertices

Get vertices from OFF

offFace Source #

Arguments

:: OFF a b

OFF

-> [Face b] 

Get faces from OFF