Vec4

data class Vec4(x: Float, y: Float, z: Float, w: Float) : Vec

4D vector with coordinates (x, y, z, w).

Can be used to specify RGBA color values.

Constructors

Vec4
Link copied to clipboard
fun Vec4(x: Float, y: Float, z: Float, w: Float)

Types

Companion
Link copied to clipboard
object Companion

Functions

toFloatArray
Link copied to clipboard
open override fun toFloatArray(): FloatArray

Returns an array of coordinates of this vector.

toList
Link copied to clipboard
open override fun toList(): List<Float>

Returns a list of coordinates of this vector.

toVec2
Link copied to clipboard
fun toVec2(): Vec2

Returns a 2D vector with x and y coordinates of this vector.

toVec3
Link copied to clipboard
fun toVec3(): Vec3

Returns a 3D vector with x, y and z coordinates of this vector.

Properties

a
Link copied to clipboard
val a: Float

Alpha channel of RGBA color.

b
Link copied to clipboard
val b: Float

Blue channel of RGBA color.

g
Link copied to clipboard
val g: Float

Green channel of RGBA color.

r
Link copied to clipboard
val r: Float

Red channel of RGBA color.

w
Link copied to clipboard
val w: Float
x
Link copied to clipboard
val x: Float
y
Link copied to clipboard
val y: Float
z
Link copied to clipboard
val z: Float