TexturedVertexArray

class TexturedVertexArray(vcount: Int, val indices: ShortArray, icount: Int = indices.size)

Allows to build a set of textured and colored vertices. Where vcount is the number of vertices and icount, the maximum number of indices.

vcount and icount could be decreased later, but not increased since the buffer is created at the beginning.

Constructors

Link copied to clipboard
constructor(vcount: Int, indices: ShortArray, icount: Int = indices.size)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val cMul: Int

cMul (multiplicative color) at the previously vertex selected by calling select

Link copied to clipboard
var icount: Int
Link copied to clipboard
Link copied to clipboard

The initial/maximum number of vertices

Link copied to clipboard
val u: Float

u (x in texture) at the previously vertex selected by calling select

Link copied to clipboard
val v: Float

v (y in texture) at the previously vertex selected by calling select

Link copied to clipboard
var vcount: Int
Link copied to clipboard

Describes the vertice previously selected by calling select

Link copied to clipboard
val x: Float

x at the previously vertex selected by calling select

Link copied to clipboard
val y: Float

y at the previously vertex selected by calling select

Functions

Link copied to clipboard
fun applyMatrix(matrix: Matrix)
Link copied to clipboard

Sets the cMul (multiplicative colors) of the vertex previously selected calling select

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getBounds(min: Int = 0, max: Int = vcount): Rectangle

Returns the bounds of the vertices defined in the indices from min to max (excluding) as Rectangle

Link copied to clipboard
fun quad(index: Int, x: Double, y: Double, width: Double, height: Double, matrix: Matrix, bmp: BmpCoords, colMul: RGBA)

Sets a textured quad at vertice index with the region defined by x,yxheight and the matrix, using the texture coords defined by BmpSlice and color transforms colMul

fun quad(index: Int, x: Float, y: Float, width: Float, height: Float, matrix: Matrix, bmp: BmpCoords, colMul: RGBA)
fun quad(index: Int, x: Float, y: Float, width: Float, height: Float, matrix: Matrix, tl_x: Float, tl_y: Float, tr_x: Float, tr_y: Float, bl_x: Float, bl_y: Float, br_x: Float, br_y: Float, colMul: RGBA)
Link copied to clipboard
fun quadV(index: Int, x: Float, y: Float, u: Float, v: Float, colMul: RGBA)
fun quadV(fast: Buffer, pos: Int, x: Float, y: Float, u: Float, v: Float, colMul: Int): Int
Link copied to clipboard

Moves the cursor for setting vertexs to the vertex i

Link copied to clipboard
fun set(index: Int, p: Point, tex: Point, colMul: RGBA)
fun set(index: Int, x: Float, y: Float, u: Float, v: Float, colMul: RGBA)
Link copied to clipboard

Sets the cMul (multiplicative color) of the vertex previously selected calling select

Link copied to clipboard
fun setSimplePoints(points: PointList, matrix: Matrix, colorMul: RGBA = Colors.WHITE)
Link copied to clipboard

Sets the u (x in texture) of the vertex previously selected calling select

Link copied to clipboard

Sets the v (y in texture) of the vertex previously selected calling select

Link copied to clipboard

Sets the x of the vertex previously selected calling select

Link copied to clipboard
fun setXY(x: Float, y: Float)
Link copied to clipboard

Sets the y of the vertex previously selected calling select

Link copied to clipboard
fun str(index: Int): String

Describes a vertex at index

Link copied to clipboard

Sets the u and v of the vertex previously selected calling select

Link copied to clipboard

Sets the x and y of the vertex previously selected calling select

fun xy(x: Double, y: Double, matrix: Matrix): TexturedVertexArray

Sets the x and y with the matrix transform applied of the vertex previously selected calling select