Babylon.js Apis – Vector4

Constructors 构造函数(Vector4)

由欧拉角类型转换成四元数函数。

欧拉角:是表示3D空间中可以表示任何旋转的三个值。

new Vector4(x: number, y: number, z: number, w: numbr): Vector4

Properties 属性

前三个个参数分别表示 x, y, z 轴方向上的值,这三个轴的在方向上分别对应着方体的六个面,

对应关系如下表:

side value
0 +z
1 -z
2 +x
3 -x
4 +y
5 -y

Methods 方法

add(otherVector: DeepImmutable): Vector4

addToRef(otherVector: DeepImmutable, result: Vector4): Vector4

asArray():number[]

3.3

clone(): Vector4

3.4

copyFrom

3.5

copyFromFloats(x: number, y: number, z: number, w: number): Vector4

3.6

divide(otherVector: DeepImmutable): Vector4

3.7

divideInPlace(otherVector: DeepImmutable): Vector4

3.8

divideToRef(otherVector: DeepImmutable, result: Vector4): Vector4

3.9

equals(otherVector:DeepImmutable): boolean

3.10

equalsToFloats(x: number,y: number, z: number, w: number): boolean

3.11

equalsWithEpsilon(otherVector: DeepImmutable, epsilon?: number): boolean

3.12

floor():Vector4

3.13

fract(): Vector4

3.14

getClassName(): string

3.15

getHashCode(): number

3.16

length(): number

3.17

lengthSquared(): number

3.18

maximizeInPlace(other: DeepImmutable): Vector4

3.19

minimizeInPlace(other: DeepImmutable): Vector4

3.20

multiply(otherVector: DeepImmutable): Vector4

3.21

multiplyByFloats(x: number, y: number, z: number, w: number): Vector4

3.22

multiplyInPlace(otherVector: Vector4): Vector4

3.24

multiplyToRef(otherVector: DeepImmutable, result: Vector4): Vector4

3.24

negate(): Vector4

3.25

normalize(): Vector4

3.26

scale(scale: number): Vector4

3.27

scaleAndAddToRef(scale: number, result: Vector4): Vector4

3.28

scaleInPlace(scale: number): Vector4

3.29

scaleToRef(scale: number, result: Vector4): Vector4

3.30

set(x: number, y: number, z: number, w: number): Vector4

3.31

setAll(v: number): Vector4

3.32

subtract(otherVector: DeepImmutable): Vector4

3.33

subtractFromFloats(x: number, y: number, z: number, w: number): Vector4

3.34

subtractFromFloatsToRef(x: number, y: number, z: number, w: number, result: Vector4): Vector4

3.35

subtractInPlace(otherVector: DeepImmutable): Vector4

3.36

subtractToRef(otherVector: DeepImmutable, result: Vector4): Vector4

3.37

toArray(array: FloatArray, index?: number): Vector4

3.38

toString(): string

3.39

toVector3(): Vector3

3.40

[static]Center(value1: DeepImmutable, value2: DeepImmutable): Vector4

3.41

[static]Distance(value1: DeepImmutable, value2: DeepImmutable): number

3.42

[static]DistanceSquared(value1: DeepImmutable, value2: DeepImmutable): number

3.43

[static]FromArray(array: DeepImmutable<ArrayLike>, offset?: number): Vector4

3.44

[static]FromArrayToRef(array: DeepImmutable<ArrayLike>, offset: number, result: Vector4): void

3.45

[statics]FromFloatArrayToRef(array: DeepImmutable, offset: number, result: Vector4): void

3.46

[static]FromFloatsToRef(x: number, y: number, z: number, w: number, result: Vector4): void

3.47

[static]Maximize(left: DeepImmutable, right: DeepImmutable): Vector4

3.48

[static]Minimize(left: DeepImmutable, right: DeepImmutable): Vector4

3.49

[static]Normalize(vector: DeepImmutable): Vector4

3.50

[static]NormalizeToRef(vector: DeepImmutable, result: Vector4): void

3.51

[static]One(): Vector4

3.52

[static]TransformNormal(vector: DeepImmutable, transformation: DeepImmutable): Vector4

3.53

[static]TransformNormalFromFloatsToRef(x: number, y: number, z: number, w: number, transformation: DeepImmutable, result: Vector4): void

3.54

[static]TransformNormalToRef(vector: DeepImmutable, transformation: DeepImmutable, result: Vector4): void

3.55

[static]Zero(): Vector4

3.56

本文标题:Babylon.js Apis – Vector4

文章作者:ZhiCheng Lee

发布时间:2019年05月06日 - 22:01:26

最后更新:2019年05月06日 - 23:23:47

原始链接:http://blog.gcl666.com/2019/05/06/babylon_api_vector4/

许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。

0%