Options
All
  • Public
  • Public/Protected
  • All
Menu

Module particle

Index

Type aliases

b2ParticleIndex

b2ParticleIndex: number

b2VoronoiDiagramNodeCallback

b2VoronoiDiagramNodeCallback: (a: number, b: number, c: number) => void

Callback used by GetNodes().

Receive tags for generators associated with a node.

Type declaration

    • (a: number, b: number, c: number): void
    • Parameters

      • a: number
      • b: number
      • c: number

      Returns void

Functions

b2CalculateParticleIterations

  • b2CalculateParticleIterations(gravity: number, radius: number, timeStep: number): number
  • Parameters

    • gravity: number
    • radius: number
    • timeStep: number

    Returns number

defaultcompare

  • defaultcompare<T>(a: T, b: T): boolean
  • Type parameters

    • T

    Parameters

    • a: T
    • b: T

    Returns boolean

stditerswap

  • stditerswap<T>(array: T[], a: number, b: number): void
  • Type parameters

    • T

    Parameters

    • array: T[]
    • a: number
    • b: number

    Returns void

stdlowerbound

  • stdlowerbound<A, B>(array: A[], first: number, last: number, val: B, cmp: (a: A, b: B) => boolean): number
  • Type parameters

    • A

    • B

    Parameters

    • array: A[]
    • first: number
    • last: number
    • val: B
    • cmp: (a: A, b: B) => boolean
        • (a: A, b: B): boolean
        • Parameters

          • a: A
          • b: B

          Returns boolean

    Returns number

stdremoveif

  • stdremoveif<T>(array: T[], predicate: (value: T) => boolean, length?: number): number
  • Type parameters

    • T

    Parameters

    • array: T[]
    • predicate: (value: T) => boolean
        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    • Default value length: number = array.length

    Returns number

stdrotate

  • stdrotate<T>(array: T[], first: number, n_first: number, last: number): void
  • Type parameters

    • T

    Parameters

    • array: T[]
    • first: number
    • n_first: number
    • last: number

    Returns void

stdsort

  • stdsort<T>(array: T[], first?: number, len?: number, cmp?: (a: T, b: T) => boolean): T[]
  • Type parameters

    • T

    Parameters

    • array: T[]
    • Default value first: number = 0
    • Default value len: number = array.length - first
    • Default value cmp: (a: T, b: T) => boolean = default_compare
        • (a: T, b: T): boolean
        • Parameters

          • a: T
          • b: T

          Returns boolean

    Returns T[]

stdstablesort

  • stdstablesort<T>(array: T[], first?: number, len?: number, cmp?: (a: T, b: T) => boolean): T[]
  • Type parameters

    • T

    Parameters

    • array: T[]
    • Default value first: number = 0
    • Default value len: number = array.length - first
    • Default value cmp: (a: T, b: T) => boolean = default_compare
        • (a: T, b: T): boolean
        • Parameters

          • a: T
          • b: T

          Returns boolean

    Returns T[]

stdunique

  • stdunique<T>(array: T[], first: number, last: number, cmp: (a: T, b: T) => boolean): number
  • Type parameters

    • T

    Parameters

    • array: T[]
    • first: number
    • last: number
    • cmp: (a: T, b: T) => boolean
        • (a: T, b: T): boolean
        • Parameters

          • a: T
          • b: T

          Returns boolean

    Returns number

stdupperbound

  • stdupperbound<A, B>(array: B[], first: number, last: number, val: A, cmp: (a: A, b: B) => boolean): number
  • Type parameters

    • A

    • B

    Parameters

    • array: B[]
    • first: number
    • last: number
    • val: A
    • cmp: (a: A, b: B) => boolean
        • (a: A, b: B): boolean
        • Parameters

          • a: A
          • b: B

          Returns boolean

    Returns number

Generated using TypeDoc