library / com.otaliastudios.opengl.draw / GlPolygon

GlPolygon

open class GlPolygon : Gl2dDrawable

Constructors

<init>

GlPolygon(sides: Int)

Properties

center

var center: <ERROR CLASS>

centerX

var centerX: Float

centerY

var centerY: Float

radius

The polygon radius. The value 1 is half the smallest viewport dimension. For example, a GlCircle with radius 1 will touch the viewport borders exactly.

var radius: Float

rotation

var rotation: Float

vertexArray

Returns the array of vertices. To avoid allocations, this returns internal state. The caller must not modify it.

open var vertexArray: FloatBuffer

Functions

draw

Draws this drawable. This function should not be called directly. Instead, this drawable should be passed to some GlProgram.

open fun draw(): Unit

onViewportSizeChanged

open fun onViewportSizeChanged(): Unit

Inheritors

GlCircle

open class GlCircle : GlPolygon

GlSquare

open class GlSquare : GlPolygon

GlTriangle

open class GlTriangle : GlPolygon