filledTriangle

fun filledTriangle(v1: Vec2f, v2: Vec2f, v3: Vec3f, color: Float = colorBits, color2: Float = color, color3: Float = color2)

Draws a filled triangle at the specified points.

Parameters

v1

the coordinates of the first vertex

v2

the coordinates of the second vertex

v3

the coordinates of the third vertex

color

the packed color of the first vertex or all if color2 or color3 are not set.

color2

the packed color of the second vertex. If color3 then the third vertex as well.

color3

the packed color of the third vertex.


fun filledTriangle(x1: Float, y1: Float, x2: Float, y2: Float, x3: Float, y3: Float, color: Float = colorBits, color2: Float = color, color3: Float = color2)

Draws a filled triangle at the specified points.

Parameters

x1

x-coord of first vertex

y1

y-coord of first vertex

x2

x-coord of second vertex

y2

y-coord of second vertex

x3

x-coord of third vertex

y3

y-coord of third vertex

color

the packed color of the first vertex or all if color2 or color3 are not set.

color2

the packed color of the second vertex. If color3 then the third vertex as well.

color3

the packed color of the third vertex.