Contains vertex data.

Available since

0.1.0

.

Constructor

@:value({ v : 0, u : 0, a : 1, b : 1, g : 1, r : 1, y : 0, x : 0 })new(x:Float = 0, y:Float = 0, r:Float = 1, g:Float = 1, b:Float = 1, a:Float = 1, u:Float = 0, v:Float = 0)

Creates an nb.Graphics.Vertex instance.

Variables

a:Float

The alpha value.

b:Float

The blue tint value.

g:Float

The green tint value.

@:value(new Point())p:Point = new Point()

A point that sets itself to (x,y), the vertex's coordinates.

r:Float

The red tint value.

u:Float

The normalized horizontal texture position.

v:Float

The normalized vertical texture position.

x:Float

The x coordinate.

y:Float

The y coordinate.

Methods

@:value({ v : 0, u : 0, a : 0, b : 0, g : 0, r : 0, y : 0, x : 0 })add(x:Float = 0, y:Float = 0, r:Float = 0, g:Float = 0, b:Float = 0, a:Float = 0, u:Float = 0, v:Float = 0):Vertex

Adds given values to this instance's current values.

clone():Vertex

Returns a new nb.Graphics.Vertex's instance with the same properties.

load(x:Float, y:Float, r:Float, g:Float, b:Float, a:Float, u:Float, v:Float):Void

Sets this instance's values.

setPosition(x:Float, y:Float):Void

Sets the vertex's coordinates.