Vector3

open class Vector3

A Vector with 3 floats.

Constructors

Link copied to clipboard
constructor()
Construct a Vector3 and assign zero to all values
constructor(x: Float, y: Float, z: Float)
Construct a Vector3 and assign each value
constructor(v: Vector3)
Construct a Vector3 and copy the values

Properties

Link copied to clipboard
open var x: Float
Link copied to clipboard
open var y: Float
Link copied to clipboard
open var z: Float

Functions

Link copied to clipboard
open fun add(lhs: Vector3, rhs: Vector3): Vector3
Adds two Vector3's
Link copied to clipboard
Returns the shortest angle in degrees between two vectors.
Link copied to clipboard
open fun back(): Vector3
Gets a Vector3 set to (0, 0, 1)
Link copied to clipboard
open fun cross(lhs: Vector3, rhs: Vector3): Vector3
Get cross product of two Vector3's
Link copied to clipboard
open fun dot(lhs: Vector3, rhs: Vector3): Float
Get dot product of two Vector3's
Link copied to clipboard
open fun down(): Vector3
Gets a Vector3 set to (0, -1, 0)
Link copied to clipboard
open fun equals(other: Any): Boolean
Returns true if the other object is a Vector3 and each component is equal within a tolerance.
open fun equals(lhs: Vector3, rhs: Vector3): Boolean
Compares two Vector3's are equal if each component is equal within a tolerance.
Link copied to clipboard
open fun forward(): Vector3
Gets a Vector3 set to (0, 0, -1)
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun left(): Vector3
Gets a Vector3 set to (-1, 0, 0)
Link copied to clipboard
open fun length(): Float
Link copied to clipboard
open fun lengthSquared(): Float
Link copied to clipboard
open fun lerp(a: Vector3, b: Vector3, t: Float): Vector3
Linearly interpolates between a and b.
Link copied to clipboard
open fun max(lhs: Vector3, rhs: Vector3): Vector3
Get a Vector3 with each value set to the element wise maximum of two Vector3's values
Link copied to clipboard
open fun min(lhs: Vector3, rhs: Vector3): Vector3
Get a Vector3 with each value set to the element wise minimum of two Vector3's values
Link copied to clipboard
open fun multiply(lhs: Vector3, rhs: Vector3): Vector3
Link copied to clipboard
open fun negated(): Vector3
Negates a Vector3
Link copied to clipboard
open fun normalized(): Vector3
Scales the Vector3 to the unit length
Link copied to clipboard
open fun one(): Vector3
Gets a Vector3 with all values set to one
Link copied to clipboard
open fun right(): Vector3
Gets a Vector3 set to (1, 0, 0)
Link copied to clipboard
open fun scaled(a: Float): Vector3
Uniformly scales a Vector3
Link copied to clipboard
open fun set(v: Vector3)
Copy the values from another Vector3 to this Vector3
open fun set(vx: Float, vy: Float, vz: Float)
Set each value
Link copied to clipboard
open fun subtract(lhs: Vector3, rhs: Vector3): Vector3
Subtract two Vector3
Link copied to clipboard
fun Vector3.toFloat3(): Float3
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
open fun up(): Vector3
Gets a Vector3 set to (0, 1, 0)
Link copied to clipboard
open fun zero(): Vector3
Gets a Vector3 with all values set to zero