PathGenerator

class cee.utils.PathGenerator()

Helper class to generate vertices for paths

Constructors


Constructors

PathGenerator.constructor()
Return type:

PathGenerator

Methods

static generateVerticesForCircle

PathGenerator.generateVerticesForCircle(center, normal, radius, numSegments)
Arguments:
  • center (Vec3) – None

  • normal (Vec3) – None

  • radius (number) – None

  • numSegments (number) – None

Generates vertices to draw a circle.

Return type:

[number]

static generateVerticesForCircleThrough3Points

PathGenerator.generateVerticesForCircleThrough3Points(p1, p2, p3, numSegments)
Arguments:
  • p1 (Vec3) – None

  • p2 (Vec3) – None

  • p3 (Vec3) – None

  • numSegments (number) – None

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

Return type:

[number]

static generateVerticesForCircularSegmentBetween2Lines

PathGenerator.generateVerticesForCircularSegmentBetween2Lines(center, endPoint1, endPoint2, radius, numSegments)
Arguments:
  • center (Vec3) – None

  • endPoint1 (Vec3) – None

  • endPoint2 (Vec3) – None

  • radius (number) – None

  • numSegments (number) – None

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

Return type:

[number]

static generateVerticesForPath

PathGenerator.generateVerticesForPath(points)
Arguments:
  • points ([Vec3]) – None

Generates vertices to draw a path connecting the given points

Return type:

[number]