Vector3

gdext.builtin.Vector3
See theVector3 companion object
final case class Vector3(x: Float, y: Float, z: Float)

Godot's Vector3: three single-precision components (12 bytes). The whole engine API is implemented in Scala (ported from core/math).

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def *(o: Vector3): Vector3
def *(s: Float): Vector3
def *(b: Basis): Vector3

Vector3 * Basis: the inverse (transposed) rotation of this vector.

Vector3 * Basis: the inverse (transposed) rotation of this vector.

Attributes

def *(q: Quaternion): Vector3

Vector3 * Quaternion: the inverse rotation of this vector.

Vector3 * Quaternion: the inverse rotation of this vector.

Attributes

def *(t: Transform3D): Vector3

Vector3 * Transform3D: the inverse transform of this point.

Vector3 * Transform3D: the inverse transform of this point.

Attributes

def +(o: Vector3): Vector3
def -(o: Vector3): Vector3
def /(o: Vector3): Vector3
def /(s: Float): Vector3
def <(o: Vector3): Boolean
def <=(o: Vector3): Boolean
def >(o: Vector3): Boolean
def >=(o: Vector3): Boolean
def abs: Vector3
def angleTo(to: Vector3): Float

A unit vector perpendicular to this one (C++ get_any_perpendicular).

A unit vector perpendicular to this one (C++ get_any_perpendicular).

Attributes

def apply(axis: Int): Float
def bezierDerivative(control1: Vector3, control2: Vector3, end: Vector3, t: Float): Vector3
def bezierInterpolate(control1: Vector3, control2: Vector3, end: Vector3, t: Float): Vector3

Requires a normalized n.

Requires a normalized n.

Attributes

def ceil: Vector3
def clamp(min: Vector3, max: Vector3): Vector3
def clampf(min: Float, max: Float): Vector3
def cross(o: Vector3): Vector3
def cubicInterpolate(b: Vector3, preA: Vector3, postB: Vector3, weight: Float): Vector3
def cubicInterpolateInTime(b: Vector3, preA: Vector3, postB: Vector3, weight: Float, bT: Float, preAT: Float, postBT: Float): Vector3
def distanceSquaredTo(to: Vector3): Float
def distanceTo(to: Vector3): Float
def dot(o: Vector3): Float
def floor: Vector3
def isEqualApprox(to: Vector3): Boolean
def isFinite: Boolean
def isNormalized: Boolean
def isZeroApprox: Boolean
def length: Float
def lengthSquared: Float
def lerp(to: Vector3, weight: Float): Vector3
def limitLength(length: Float = ...): Vector3
def max(o: Vector3): Vector3
def maxAxisIndex: Long
def maxf(o: Float): Vector3
def min(o: Vector3): Vector3
def minAxisIndex: Long
def minf(o: Float): Vector3
def moveToward(to: Vector3, delta: Float): Vector3
def outer(o: Vector3): Basis

The outer product: the Basis whose rows are this(i) * with.

The outer product: the Basis whose rows are this(i) * with.

Attributes

def posmod(mod: Float): Vector3
def posmodv(modv: Vector3): Vector3

Requires a normalized n.

Requires a normalized n.

Attributes

def rotated(axis: Vector3, angle: Float): Vector3

Rotate around a normalized axis by angle radians.

Rotate around a normalized axis by angle radians.

Attributes

def round: Vector3
def sign: Vector3
def signedAngleTo(to: Vector3, axis: Vector3): Float
def slerp(to: Vector3, weight: Float): Vector3
def slide(n: Vector3): Vector3

Requires a normalized n.

Requires a normalized n.

Attributes

def snapped(step: Vector3): Vector3
def snappedf(step: Float): Vector3

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product