Options
All
  • Public
  • Public/Protected
  • All
Menu

3D向量类

class

Vector3

Hierarchy

  • Vector3

Index

Constructors

constructor

  • new Vector3(x?: number, y?: number, z?: number): Vector3
  • Parameters

    • Default value x: number = 0
    • Default value y: number = 0
    • Default value z: number = 0

    Returns Vector3

Properties

x

x: number

y

y: number

z

z: number

Methods

__@iterator

  • __@iterator(): Iterator<number>
  • 迭代器

    memberof

    Vector3

    Returns Iterator<number>

getVec3FloatArray

  • getVec3FloatArray(): Float32Array
  • 获取该向量的 vec3 类型化数组

    memberof

    Vector3

    Returns Float32Array

normalize

  • normalize(): void
  • normalize 向量标准化

    memberof

    Vector3

    Returns void

Static crossProduct

Static dotProduct

  • dotProduct 向量点乘 反应两向量相似程度

    static
    memberof

    Vector3

    Parameters

    Returns number

Static getAngle

Static getDistance

Static getNorm

  • getNorm 向量取模

    static
    memberof

    Vector3

    Parameters

    Returns number

Static isEqual

  • isEqual 判断两向量是否相等

    static
    memberof

    Vector3

    Parameters

    Returns boolean

Static negate

Static plus

Static scalarMultiply

Static vector3Multiply

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc