Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CurvesRegularPolygonSquare

Curves regular polygon square

See the ngx3js docs page for details. See the ngx curve page for a live curve demo.

Hierarchy

Index

Constructors

constructor

constructor

Properties

arcLengthDivisions

arcLengthDivisions: number

This value determines the amount of divisions when calculating the cumulative segment lengths of a curve via .getLengths. To ensure precision when using methods like .getSpacedPoints, it is recommended to increase .arcLengthDivisions if the curve is very large. Default is 200.

default

200

points

points: I3JS.Vector3[] = []

The Points of curves polygon

type

type: string
default

'Curve'

Static arcLengthDivisions

arcLengthDivisions: number

This value determines the amount of divisions when calculating the cumulative segment lengths of a curve via .getLengths. To ensure precision when using methods like .getSpacedPoints, it is recommended to increase .arcLengthDivisions if the curve is very large. Default is 200.

default

200

Static type

type: string
default

'Curve'

Methods

addPoint

clearPoints

  • clearPoints(): void

clone

computeFrenetFrames

copy

fromJSON

getLength

  • getLength(): number

getLengths

  • getLengths(divisions?: number): number[]

getPoint

getPointAt

getPoints

getSpacedPoints

getTangent

  • Parameters

    • t: number

      A position on the curve. Must be in the range [ 0, 1 ].

    • Optional optionalTarget: I3JS.Vector3

      If specified, the result will be copied into this Vector, otherwise a new Vector will be created.

    Returns I3JS.Vector3

    Returns a unit vector tangent at t. If the derived curve does not implement its tangent derivation, two points a small delta apart will be used to find its gradient which seems to give a reasonable approximation.

getTangentAt

getUtoTmapping

  • getUtoTmapping(u: number, distance: number): number

setVertex

  • setVertex(vertex: number): void

toJSON

  • toJSON(): object

updateArcLengths

  • updateArcLengths(): void

Static clone

Static computeFrenetFrames

Static copy

Static fromJSON

Static getLength

  • getLength(): number

Static getLengths

  • getLengths(divisions?: number): number[]

Static getPoint

Static getPointAt

Static getPoints

Static getSpacedPoints

Static getTangent

  • Parameters

    • t: number

      A position on the curve. Must be in the range [ 0, 1 ].

    • Optional optionalTarget: I3JS.Vector3

      If specified, the result will be copied into this Vector, otherwise a new Vector will be created.

    Returns I3JS.Vector3

    Returns a unit vector tangent at t. If the derived curve does not implement its tangent derivation, two points a small delta apart will be used to find its gradient which seems to give a reasonable approximation.

Static getTangentAt

Static getUtoTmapping

  • getUtoTmapping(u: number, distance: number): number

Static toJSON

  • toJSON(): object

Static updateArcLengths

  • updateArcLengths(): void

Generated using TypeDoc