Options
All
  • Public
  • Public/Protected
  • All
Menu

表示三维的一个向量

Class representing a vector containing 3 coordinates

Hierarchy

  • Vector3

Index

Constructors

constructor

  • new Vector3(x?: number, y?: number, z?: number): Vector3
  • new Vector3(point?: Partial<IVec3>): Vector3

Properties

x

x: number = ...

向量的 x 值

The X value of the current vector

default

0

y

y: number = ...

向量的 y 值

The Y value of the current vector

default

0

z

z: number = ...

向量的 z 值

The Z value of the current vector

default

0

Static Readonly MAX

MAX: Vector3 = ...

Vector3 (Infinity, Infinity, Infinity)

Static Readonly MIN

MIN: Vector3 = ...

Vector3 (-Infinity, -Infinity, -Infinity)

Static Readonly ONE

ONE: Vector3 = ...

Vector3 (1, 1, 1)

Static X_DIRECTION

X_DIRECTION: Vector3 = ...

X轴正方向

The positive direction of the X-Axis

Static Y_DIRECTION

Y_DIRECTION: Vector3 = ...

Y轴正方向

The positive direction of the Y-Axis

Static Readonly ZERO

ZERO: Vector3 = ...

Vector3 (0, 0, 0)

Static Z_DIRECTION

Z_DIRECTION: Vector3 = ...

Z轴正方向

The positive direction of the Z-Axis

Accessors

length

  • get length(): number

lengthSq

  • get lengthSq(): number

Methods

add

applyMatrix4

clone

copy

cross

divide

dot

equals

inverse

isOrthogonal

  • isOrthogonal(v: Vector3): boolean

isParallel

multiply

normalize

set

  • 设置向量的值

    Sets values of the current vector

    Parameters

    • Optional x: number

      x value

    • Optional y: number

      y value

    • Optional z: number

      z value

    Returns Vector3

    当前向量 (this vector3)

  • 设置向量的值

    Sets values of the current vector

    Parameters

    • point: Partial<IVec3>

      An object that contains the values x, y and z

    Returns Vector3

    当前向量 (this vector3)

setX

  • 设置向量的 x 值

    Sets the x value of the current vector

    Parameters

    • x: number

    Returns Vector3

    当前向量 (this vector3)

setY

  • 设置向量的 y 值

    Sets the y value of the current vector

    Parameters

    • y: number

    Returns Vector3

    当前向量 (this vector3)

setZ

  • 设置向量的 z 值

    Sets the z value of the current vector

    Parameters

    • z: number

    Returns Vector3

    当前向量 (this vector3)

sub

Legend

  • Constructor
  • Property
  • Method
  • Static property
  • Static method
  • Property
  • Private property

Generated using TypeDoc