Foundations
78 pages
-
point2.ofThe plane point with the given coordinates. -
point2.isFiniteWhether both coordinates of a plane point are finite numbers. -
point2.distanceThe Euclidean distance between two plane points. -
point3.ofThe point in space with the given coordinates. -
point3.isFiniteWhether every coordinate of a point is a finite number. -
point3.addThe point reached by moving a point along a vector. -
point3.subThe vector from point b to point a. -
point3.distanceThe Euclidean distance between two points in space. -
point3.lerpThe point at a normalised parameter along the segment from a to b. -
point3.toArrayThe point as an [x, y, z] tuple, the layout the WASM exports take. -
point3.atThe point stored at a given index in a flat position array. -
vector2.ofThe plane vector with the given components. -
vector2.lengthThe Euclidean length of a plane vector. -
vector2.crossThe z component of a × b: positive when b turns counter-clockwise from a. -
vector3.ofThe vector in space with the given components. -
vector3.addThe sum of two vectors. -
vector3.subThe difference a − b of two vectors. -
vector3.scaleThe vector multiplied by a scalar. -
vector3.dotThe dot product of two vectors. -
vector3.crossThe cross product a × b, perpendicular to both by the right-hand rule. -
vector3.lengthThe Euclidean length of a vector. -
vector3.unitThe vector scaled to length 1, or null when it has no direction. -
vector3.angleRadThe unsigned angle between two vectors, in radians. -
interval.ofThe closed interval from t0 to t1, kept in the order given. -
interval.lengthThe signed length t1 − t0 of an interval. -
interval.atThe value at a normalised parameter: 0 gives t0, 1 gives t1. -
interval.normalizeThe normalised parameter of a value within an interval, the inverse of Interval.at. -
interval.includesWhether a value lies between the interval’s ends, inclusive, in either order. -
bbox.isEmptyWhether a box contains no point. -
bbox.ofPointsThe smallest axis-aligned box containing every finite point. -
bbox.ofFlatThe smallest axis-aligned box containing every finite point of a flat position array. -
bbox.unionThe smallest box containing both boxes. -
bbox.diagonalThe length of the box’s diagonal, the kernel’s measure of model size. -
bbox.centerThe centre point of a box. -
bbox.containsWhether a point lies inside a box or on its boundary. -
bbox.cornersThe eight corners of a box, for transforming it. -
line.ofThe segment from one point to another. -
line.lengthThe length of a segment. -
line.pointAtThe point at a normalised parameter along a segment. -
ray.ofThe half-line from a point along a direction. -
ray.pointAtThe point at parameter t along a ray: origin + t · direction. -
plane.fromFrameThe plane through a point with a given x direction, its y axis towards a hint vector. -
plane.fromNormalThe plane through a point with a given normal and a deterministic x axis. -
plane.pointAtThe world point at plane coordinates (u, v, w). -
plane.signedDistanceThe signed distance of a point from a plane, positive on the normal’s side. -
transform.translationThe transform that moves everything by a vector. -
transform.scaleThe transform that scales uniformly or per axis about a centre point. -
transform.rotationThe rotation by an angle about an axis through a centre, counter-clockwise by the right-hand rule. -
transform.planeToPlaneThe transform that maps one plane’s frame onto another’s: origin to origin, axes to axes. -
transform.multiplyThe composition a · b, which applies b first and then a. -
transform.applyToPointThe point moved by a transform, translation included. -
transform.applyToVectorThe direction transformed by a transform’s linear part, without translation. -
transform.applyToFlatA new flat position array with every point transformed. -
transform.isFiniteWhether a transform has exactly sixteen entries, all finite. -
tolerance.explicitA tolerance the caller chose, clamped into the usable range. -
tolerance.forBoxThe kernel’s default tolerance for an input of a given extent: the box diagonal × 1e-9. -
tolerance.resolveThe tolerance an operation uses: the caller’s when given, else the default for the input box. -
result.okA successful result carrying a value and any warnings. -
result.failA failed result with one diagnostic built from a catalogue code. -
result.failWithA failed result carrying diagnostics that already exist. -
result.errorThe first error diagnostic of a failure. -
result.unwrapThe value of a success, or a thrown KernelDiagnosticError carrying the failure’s first error. -
result.valueOrThe value of a success, or a fallback on failure. -
result.mapA success with its value transformed; a failure passes through unchanged. -
result.andThenThe result of a fallible next step on a success, with diagnostics accumulated; a failure short-circuits. -
result.attemptThe value of a raw-tier call as a success, or whatever it throws as a coded failure. -
elementSet.pointsThe set naming points (positions) by index. -
elementSet.primsThe set naming primitives (faces of a polygon mesh) by index. -
elementSet.verticesThe set naming vertices (corners of primitives) by index. -
elementSet.instancesThe set naming copies made by instancing, by index. -
elementSet.edgesThe set naming edges as point-index pairs, each stored low index first. -
elementSet.cvsThe set naming NURBS control points by grid position: i along u, j along v. -
elementSet.nodesThe set naming graph nodes by id. -
elementSet.connectionsThe set naming graph connections, each written from.port->to.port. -
elementSet.sizeThe number of elements a set lists. -
elementSet.keysOne string key per element, equal for the same element of the same revision and node. -
elementSet.toEntityRefThe entity reference a diagnostic carries for this set, or null when diagnostics cannot name its kind. -
elementSet.fromEntityRefThe element set a diagnostic’s entity reference names, placed in a revision and node.