Geometry

Description

Name

class Tinman.Shape.Geometry

Derived from

Shape

Creates a shape from the given geometry.

Fields / Required

vertices

Type

Vec2[]

Constraint

# != null

The shape vertices, given as optionally georeferenced coordinates.

Fields / Optional

edges

Type

Vec2[]

Default

null

The shape edges, given as pairs of vertex indices.


triangles

Type

Vec3[]

Default

null

The shape triangles, given as triplets of vertex indices.


parity

Type

number

Default

0

The shape edge parity.


georef

Type

CoordSys

Default

null

The shape georeference.


metadata

Type

string

Default

null

The shape JSON metadata.


values

Type

number[][]

Default

null

The custom per-vertex values, indexed as follows:

values[index][vertex] := value

where vertex is the zero-based vertex index and index refers to a custom shape value:
0 : Shape.Value.Custom
1 : Shape.Value.Vertical