OpenGL-3.0.3.0: A binding for the OpenGL graphics system

Copyright (c) Sven Panne 2002-2019 BSD3 Sven Panne stable portable None Haskell2010

Graphics.Rendering.OpenGL.GLU.Tessellation

Description

This module corresponds to chapter 5 (Polygon Tessellation) of the GLU specs.

Synopsis

# Polygon description

The basic building block in tessellation is a 3D vertex with an associated property, e.g. color, texture coordinates, etc.

Constructors

 AnnotatedVertex (Vertex3 GLdouble) v
Instances
 Eq v => Eq (AnnotatedVertex v) Source # Instance details Methods(==) :: AnnotatedVertex v -> AnnotatedVertex v -> Bool #(/=) :: AnnotatedVertex v -> AnnotatedVertex v -> Bool # Ord v => Ord (AnnotatedVertex v) Source # Instance details Methods(<) :: AnnotatedVertex v -> AnnotatedVertex v -> Bool #(<=) :: AnnotatedVertex v -> AnnotatedVertex v -> Bool #(>) :: AnnotatedVertex v -> AnnotatedVertex v -> Bool #(>=) :: AnnotatedVertex v -> AnnotatedVertex v -> Bool # Source # Instance details MethodspeekElemOff :: Ptr (AnnotatedVertex v) -> Int -> IO (AnnotatedVertex v) #pokeElemOff :: Ptr (AnnotatedVertex v) -> Int -> AnnotatedVertex v -> IO () #peekByteOff :: Ptr b -> Int -> IO (AnnotatedVertex v) #pokeByteOff :: Ptr b -> Int -> AnnotatedVertex v -> IO () #peek :: Ptr (AnnotatedVertex v) -> IO (AnnotatedVertex v) #poke :: Ptr (AnnotatedVertex v) -> AnnotatedVertex v -> IO () #

newtype ComplexContour v Source #

A complex contour, which can be self-intersecting and/or concave.

Constructors

 ComplexContour [AnnotatedVertex v]
Instances
 Eq v => Eq (ComplexContour v) Source # Instance details Methods(==) :: ComplexContour v -> ComplexContour v -> Bool #(/=) :: ComplexContour v -> ComplexContour v -> Bool # Ord v => Ord (ComplexContour v) Source # Instance details Methods(<) :: ComplexContour v -> ComplexContour v -> Bool #(<=) :: ComplexContour v -> ComplexContour v -> Bool #(>) :: ComplexContour v -> ComplexContour v -> Bool #(>=) :: ComplexContour v -> ComplexContour v -> Bool #

newtype ComplexPolygon v Source #

A complex (possibly concave) polygon, represented by one or more complex and possibly intersecting contours.

Constructors

 ComplexPolygon [ComplexContour v]
Instances
 Eq v => Eq (ComplexPolygon v) Source # Instance details Methods(==) :: ComplexPolygon v -> ComplexPolygon v -> Bool #(/=) :: ComplexPolygon v -> ComplexPolygon v -> Bool # Ord v => Ord (ComplexPolygon v) Source # Instance details Methods(<) :: ComplexPolygon v -> ComplexPolygon v -> Bool #(<=) :: ComplexPolygon v -> ComplexPolygon v -> Bool #(>) :: ComplexPolygon v -> ComplexPolygon v -> Bool #(>=) :: ComplexPolygon v -> ComplexPolygon v -> Bool #

# Combining vertices

Four vertex properties (cf. AnnotatedVertex) with associated weigths summing up to 1.0.

Constructors

 WeightedProperties (GLfloat, v) (GLfloat, v) (GLfloat, v) (GLfloat, v)
Instances
 Eq v => Eq (WeightedProperties v) Source # Instance details Methods Ord v => Ord (WeightedProperties v) Source # Instance details Methods

type Combiner v = Vertex3 GLdouble -> WeightedProperties v -> v Source #

A function combining given vertex properties into a property for a newly generated vertex

# Tessellation parameters

Instances
 Source # Instance details Methods Source # Instance details Methods Source # Instance details MethodsshowList :: [TessWinding] -> ShowS #

The relative tolerance under which two vertices can be combined (see Combiner). Multiplication with the largest coordinate magnitude of all polygon vertices yields the maximum distance between two mergeable vertices.

Note that merging is optional and the tolerance is only a hint.

# Tessellator type

type Tessellator p v = TessWinding -> Tolerance -> Normal3 GLdouble -> Combiner v -> ComplexPolygon v -> IO (p v) Source #

A general tessellator type.

Before tessellation of a complex polygon, all its vertices are projected into a plane perpendicular to the given normal. If the given normal is Normal3 0 0 0, a fitting plane of all vertices is used.

# Contour extraction

newtype SimpleContour v Source #

A simple, non-self-intersecting contour

Constructors

 SimpleContour [AnnotatedVertex v]
Instances
 Eq v => Eq (SimpleContour v) Source # Instance details Methods(==) :: SimpleContour v -> SimpleContour v -> Bool #(/=) :: SimpleContour v -> SimpleContour v -> Bool # Ord v => Ord (SimpleContour v) Source # Instance details Methods(<) :: SimpleContour v -> SimpleContour v -> Bool #(<=) :: SimpleContour v -> SimpleContour v -> Bool #(>) :: SimpleContour v -> SimpleContour v -> Bool #(>=) :: SimpleContour v -> SimpleContour v -> Bool #max :: SimpleContour v -> SimpleContour v -> SimpleContour v #min :: SimpleContour v -> SimpleContour v -> SimpleContour v #

newtype PolygonContours v Source #

The contours of a complex polygon, represented by one or more non-intersecting simple contours

Constructors

 PolygonContours [SimpleContour v]
Instances
 Eq v => Eq (PolygonContours v) Source # Instance details Methods(==) :: PolygonContours v -> PolygonContours v -> Bool #(/=) :: PolygonContours v -> PolygonContours v -> Bool # Ord v => Ord (PolygonContours v) Source # Instance details Methods(<) :: PolygonContours v -> PolygonContours v -> Bool #(<=) :: PolygonContours v -> PolygonContours v -> Bool #(>) :: PolygonContours v -> PolygonContours v -> Bool #(>=) :: PolygonContours v -> PolygonContours v -> Bool #

# Triangulation

type TriangleVertex v = AnnotatedVertex (v, EdgeFlag) Source #

data Triangle v Source #

A triangle, represented by three triangle vertices

Constructors

 Triangle (TriangleVertex v) (TriangleVertex v) (TriangleVertex v)
Instances
 Eq v => Eq (Triangle v) Source # Instance details Methods(==) :: Triangle v -> Triangle v -> Bool #(/=) :: Triangle v -> Triangle v -> Bool # Ord v => Ord (Triangle v) Source # Instance details Methodscompare :: Triangle v -> Triangle v -> Ordering #(<) :: Triangle v -> Triangle v -> Bool #(<=) :: Triangle v -> Triangle v -> Bool #(>) :: Triangle v -> Triangle v -> Bool #(>=) :: Triangle v -> Triangle v -> Bool #max :: Triangle v -> Triangle v -> Triangle v #min :: Triangle v -> Triangle v -> Triangle v #

newtype Triangulation v Source #

A triangulation of a complex polygon

Constructors

 Triangulation [Triangle v]
Instances
 Eq v => Eq (Triangulation v) Source # Instance details Methods(==) :: Triangulation v -> Triangulation v -> Bool #(/=) :: Triangulation v -> Triangulation v -> Bool # Ord v => Ord (Triangulation v) Source # Instance details Methods(<) :: Triangulation v -> Triangulation v -> Bool #(<=) :: Triangulation v -> Triangulation v -> Bool #(>) :: Triangulation v -> Triangulation v -> Bool #(>=) :: Triangulation v -> Triangulation v -> Bool #max :: Triangulation v -> Triangulation v -> Triangulation v #min :: Triangulation v -> Triangulation v -> Triangulation v #

# Tessellation into primitives

data Primitive v Source #

Constructors

 Primitive PrimitiveMode [AnnotatedVertex v]
Instances
 Eq v => Eq (Primitive v) Source # Instance details Methods(==) :: Primitive v -> Primitive v -> Bool #(/=) :: Primitive v -> Primitive v -> Bool # Ord v => Ord (Primitive v) Source # Instance details Methodscompare :: Primitive v -> Primitive v -> Ordering #(<) :: Primitive v -> Primitive v -> Bool #(<=) :: Primitive v -> Primitive v -> Bool #(>) :: Primitive v -> Primitive v -> Bool #(>=) :: Primitive v -> Primitive v -> Bool #max :: Primitive v -> Primitive v -> Primitive v #min :: Primitive v -> Primitive v -> Primitive v #

newtype SimplePolygon v Source #

Constructors

 SimplePolygon [Primitive v]
Instances
 Eq v => Eq (SimplePolygon v) Source # Instance details Methods(==) :: SimplePolygon v -> SimplePolygon v -> Bool #(/=) :: SimplePolygon v -> SimplePolygon v -> Bool # Ord v => Ord (SimplePolygon v) Source # Instance details Methods(<) :: SimplePolygon v -> SimplePolygon v -> Bool #(<=) :: SimplePolygon v -> SimplePolygon v -> Bool #(>) :: SimplePolygon v -> SimplePolygon v -> Bool #(>=) :: SimplePolygon v -> SimplePolygon v -> Bool #max :: SimplePolygon v -> SimplePolygon v -> SimplePolygon v #min :: SimplePolygon v -> SimplePolygon v -> SimplePolygon v #
{"ft_lang_label":"__label__en","ft_lang_prob":0.546108,"math_prob":0.70565337,"size":10482,"snap":"2020-45-2020-50","text_gpt3_token_len":2636,"char_repetition_ratio":0.25167015,"word_repetition_ratio":0.45003065,"special_character_ratio":0.27551994,"punctuation_ratio":0.19906479,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99267787,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-21T08:34:02Z\",\"WARC-Record-ID\":\"<urn:uuid:041e0eba-ce29-4dec-9690-ce764bb6afa6>\",\"Content-Length\":\"105868\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:96647502-ec21-43d8-bc6e-f2e42b410d4a>\",\"WARC-Concurrent-To\":\"<urn:uuid:b1f7bb77-325c-401a-8f3a-940d19e8f719>\",\"WARC-IP-Address\":\"151.101.200.68\",\"WARC-Target-URI\":\"https://hackage.haskell.org/package/OpenGL-3.0.3.0/docs/Graphics-Rendering-OpenGL-GLU-Tessellation.html\",\"WARC-Payload-Digest\":\"sha1:JN4XIHTJWVLXPF6UFIWKKGSROXMJPU7D\",\"WARC-Block-Digest\":\"sha1:EM3F6CCKUOOPAJJXVOWRV4GF6224ZWTM\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107876136.24_warc_CC-MAIN-20201021064154-20201021094154-00191.warc.gz\"}"}