Vector4

THREE.Vector4
class Vector4(var x: UndefOr[Double], var y: UndefOr[Double], var z: UndefOr[Double], var w: UndefOr[Double]) extends Object

Class representing a 4D vector.

A 4D vector is typically used for representing homogeneous coordinates or quaternions.

Attributes

Graph
Supertypes
class Object
trait Any
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def add(v: Vector4): this.type
def addScalar(s: Double): this.type
def addScaledVector(v: Vector4, s: Double): this.type
def addVectors(a: Vector4, b: Vector4): this.type
def applyMatrix4(m: Matrix4): this.type
def ceil(): this.type
def clamp(min: Vector4, max: Vector4): this.type
def clampLength(min: Double, max: Double): this.type
def clampScalar(minVal: Double, maxVal: Double): this.type
def copy(v: Vector4): this.type
def divideScalar(scalar: Double): this.type
def dot(v: Vector4): Double
def equals(v: Vector4): Boolean
def floor(): this.type
def fromArray(array: Array[Double], offset: Int): this.type
def fromBufferAttribute(attribute: Object, index: Int): this.type
def getComponent(index: Int): Double
def jsClone(): Vector4
def length(): Double
def lengthSq(): Double
def lerp(v: Vector4, alpha: Double): this.type
def lerpVectors(v1: Vector4, v2: Vector4, alpha: Double): this.type
def manhattanLength(): Double
def max(v: Vector4): this.type
def min(v: Vector4): this.type
def multiply(v: Vector4): this.type
def multiplyScalar(scalar: Double): this.type
def negate(): this.type
def normalize(): this.type
def random(): this.type
def round(): this.type
def roundToZero(): this.type
def set(x: Double, y: Double, z: Double, w: Double): this.type
def setComponent(index: Int, value: Double): this.type
def setLength(length: Double): this.type
def setScalar(scalar: Double): this.type
def setW(w: Double): this.type
def setX(x: Double): this.type
def setY(y: Double): this.type
def setZ(z: Double): this.type
def sub(v: Vector4): this.type
def subScalar(s: Double): this.type
def subVectors(a: Vector4, b: Vector4): this.type
def toArray(array: Array[Double], offset: Int): Array[Double]

Inherited methods

def hasOwnProperty(v: String): Boolean

Attributes

Inherited from:
Object
def isPrototypeOf(v: Object): Boolean

Attributes

Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean

Attributes

Inherited from:
Object
def toLocaleString(): String

Attributes

Inherited from:
Object
def valueOf(): Any

Attributes

Inherited from:
Object

Concrete fields

val isVector4: Boolean
var w: UndefOr[Double]
var x: UndefOr[Double]
var y: UndefOr[Double]
var z: UndefOr[Double]