Options
All
  • Public
  • Public/Protected
  • All
Menu

A 2D column vector with 3 elements.

Hierarchy

  • b2Vec3

Index

Constructors

constructor

  • new b2Vec3(x?: number, y?: number, z?: number): b2Vec3
  • Construct using coordinates x,y,z.

    Parameters

    • Optional x: number

      x value, default = 0.

    • Optional y: number

      y value, default = 0.

    • Optional z: number

      z value, default = 0.

    Returns b2Vec3

Properties

x

x: number

x value.

y

y: number

y value.

z

z: number

z value.

Methods

Add

  • Adds the vector 3 to this vector 3. The result is stored in this vector 3.

    Parameters

    Returns void

Copy

  • Creates a copy of the vector 3.

    Returns b2Vec3

    Copy of this vector 3.

GetNegative

  • Gets the negative of this vector 3.

    Returns b2Vec3

    Negative copy of this vector 3.

Multiply

  • Multiply(a: number): void
  • Vector multiplication. Stores the result in this vector 3.

    Parameters

    • a: number

      Value to multiple the vector's values by.

    Returns void

NegativeSelf

  • NegativeSelf(): void
  • Sets this vector 3 to its negative.

    Returns void

Set

  • Set(x?: number, y?: number, z?: number): void
  • Sets the vector 3.

    Parameters

    • Optional x: number

      x value, default is 0.

    • Optional y: number

      y value, default is 0.

    • Optional z: number

      z value, default is 0.

    Returns void

SetV

  • Sets the vector 3 from a vector 3.

    Parameters

    • v: b2Vec3

      Vector 3 to copy values from.

    Returns void

SetZero

  • SetZero(): void
  • Sets the vector 3 to zero values.

    Returns void

Subtract

  • Subtracts the vector 3 from this vector 3. The result is stored in this vector 3.

    Parameters

    • v: b2Vec3

      Vector 3 to subtract.

    Returns void

Generated using TypeDoc