Copyright © 2021 by K4.org
  (v.0.48.124)

Index

Type aliases

GeoJsonMultiPolygon

GeoJsonMultiPolygon: GeoJsonPolygon[]

A set of polygons

GeoJsonPoint

GeoJsonPoint: [number, number]

A 2D point in GEOJSON form. Used only by the Polygon primitive.

GeoJsonPolygon

GeoJsonPolygon: GeoJsonRing[]

A polygon consisting of a boundary ring and any number of hole rings. Used only by the Polygon primitive.

GeoJsonRing

GeoJsonRing: GeoJsonPoint[]

A chain of GeoJsonPoints forming a closed polygon. The first and last points must be identical. Used only by the Polygon primitive.

KeyFunction

KeyFunction: function

A function that, given an object, returns a "key" which represents that object, usually in a set operation.

(obj: any) => any

MatchFunction

MatchFunction: function

A function that given two values, determines whether they match and returns a boolean. Usually used in set operations when "equal" is not appropriate.

(a: any, b: any) => boolean

PositionSpec

A PositionSpec is used exclusively in position rules.

Variables

Const maxDeviation

maxDeviation: number = getSettings().geometry.maxDeviation

Functions

AAA

  • Arbitrary Axis Algorithm. Given a Z axis, return X. This is a user-level function, so it does a zero-vector check.

    Parameters

    Returns Vector

checkPositionSpec

computeTransform

  • Computes the transform to get from fromFrame to toFrame, such that: fromFrame x newFrame => toFrame

    Parameters

    • fromFrame: Frame

      starting transform

    • toFrame: Frame

      ending transform

    Returns Frame

makeBBox

  • Creates and returns a BBox object. If no points are provided, creates an empty BBox.

    Parameters

    • Rest ...points: Point[]

      Optional. Any number of points

    Returns BBox

makeFrame

  • Creates and returns a frame, given the origin and a pair of Vectors. All arguments are optional, this creates anything it doesn't have.

    Parameters

    • Optional origin: Point

      Optional origin of new Frame

    • Optional xdir: Vector

      Optional x-direction of new Frame

    • Optional ydir: Vector

      Optional y-direction of new Frame

    Returns Frame

p

  • p(x: number, y: number, z: number, f?: Frame): Point
  • This is the global point constructor. If f is not supplied, uses the local coordinate system to transform the supplied coordinates to world coordinates.

    Parameters

    • x: number

      Local coordinate in the local x direction.

    • y: number

      Local coordinate in the local y direction.

    • z: number

      Local coordinate in the local z direction.

    • Optional f: Frame

      Frame to transform. Defaults to the context transform.

    Returns Point

toLowerKeys

  • toLowerKeys(obj: any): any
  • Parameters

    • obj: any

    Returns any

v

  • v(x: number, y: number, z: number, f?: Frame): Vector
  • This is the global vector constructor. If f is not supplied, uses the local coordinate system to transform the supplied coordinates to world coordinates.

    Parameters

    • x: number

      Local magnitude in the local x direction.

    • y: number

      Local magnitude in the local y direction.

    • z: number

      Local magnitude in the local z direction.

    • Optional f: Frame

      Frame to transform. Defaults to the local transform.

    Returns Vector