Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PolygonalChain

Chain of line segments for generating spawn positions.

Hierarchy

  • PolygonalChain

Index

Constructors

constructor

Properties

Private countingLengths

countingLengths: number[]

Total length of segments up to and including the segment of the same index. Used for weighted random selection of segment.

Private segments

segments: Segment[]

List of segment objects in the chain.

Private totalLength

totalLength: number

Total length of all segments of the chain.

Methods

getRandomPoint

  • getRandomPoint(out: Point): void
  • Gets a random point in the chain.

    Parameters

    • out: Point

      The point to store the selected position in.

    Returns void

Private init

Generated using TypeDoc