PathGenerator

class cee.utils.PathGenerator()

Helper class to generate vertices for paths

Constructors

cee.utils.PathGenerator.constructor()
PathGenerator(): PathGenerator

Returns: PathGenerator

Methods

static cee.utils.PathGenerator.generateVerticesForCircle()

static

generateVerticesForCircle(center: Vec3, normal: Vec3, radius: number, numSegments: number): number[]

Generates vertices to draw a circle.

Parameters

center: Vec3

normal: Vec3

radius: number

numSegments: number

Returns: number[]

static cee.utils.PathGenerator.generateVerticesForCircleThrough3Points()

static

generateVerticesForCircleThrough3Points(p1: Vec3, p2: Vec3, p3: Vec3, numSegments: number): number[]

Generates vertices to draw a circle passing through the given 3 points. Returns null when the points (p1, p2, p3) do not specify a circle, e.g. they lie on a straight line.

Parameters

p1: Vec3

p2: Vec3

p3: Vec3

numSegments: number

Returns: number[]

static cee.utils.PathGenerator.generateVerticesForCircularSegmentBetween2Lines()

static

generateVerticesForCircularSegmentBetween2Lines(center: Vec3, endPoint1: Vec3, endPoint2: Vec3, radius: number, numSegments: number): number[]

Generates vertices to draw a circular segment between the lines <center, endPoint1> and <center, endPoint2>. Returns null when the points (center, endpoint1, endpoint2) do not specify a circle, e.g. they lie on a straight line.

Parameters

center: Vec3

endPoint1: Vec3

endPoint2: Vec3

radius: number

numSegments: number

Returns: number[]

static cee.utils.PathGenerator.generateVerticesForPath()

static

generateVerticesForPath(points: Vec3[]): number[]

Generates vertices to draw a path connecting the given points

Parameters

points: Vec3[]

Returns: number[]