Hexel Module
Hexel (Hygrid Engine) Implements the base coordinate system and logic for the Hygrid Woven Ensemble. Acts as the fundamental unit (Hexel) in the architectural hierarchy: Hexel-Coxel-Xyxel-Zaxel.
Types
| Type | Description |
|
Hexel types: Categorization based on location availabity. |
|
|
|
|
|
Sequence specifies the orientation of hexels, the direction of flow of adjacent hexels and the position of the first of the six adjaent hexels. |
Functions and values
| Function or value |
Description
|
|
|
|
|
|
High-performance O(1) variant of available using a HashSet of occupied cells.
Example
val occSet: obj
val freeCount: obj
|
|
|
|
|
|
|
|
Classifies candidate hexels against an occupied obstacle array into available (AV) or reserved (RV) state.
Example
val classified: obj
|
Classifies an array of hexels into available (AV) or boundary/reserved (RV) status using a HashSet for high performance.
Example
val occSet: obj
val checkedCells: obj
|
|
Deconstructs any Hxl instance and returns its raw (x, y, z) integer coordinate triple.
Example
val x: obj
val y: obj
val z: obj
|
|
|
Detects and fills internal cavities or voids trapped within an enclosed cluster of hexels.
Example
val filled: obj
|
|
|
|
|
|
Creates a System.Collections.Generic.HashSet of AV hexels for high-performance O(1) membership lookups.
Example
val occSet: obj
val isOccupied: obj
|
|
|
|
|
|
Returns the lattice origin anchor cell at the specified elevation: RV(0, 0, elv).
Example
val origin: obj
|
|
|
Full Usage:
incrementSet sqn elv (arg3, arg3) occ
Parameters:
Sqn
-
Traversal sequence.
elv : int
-
Elevation layer.
arg2 : Hxl
arg3 : int
occ : HashSet<Hxl>
-
HashSet of currently occupied obstacle hexels.
Returns: Hxl * int
Option containing next candidate hexel and weight, or invalid hexel tuple if blocked.
|
Computes the next optimal expansion hexel for a spatial cluster using a HashSet for high-performance O(1) occupancy checks.
Example
val occSet: obj
val next: obj
|
|
Advances multiple active cluster seeds simultaneously while preventing mutual collision.
Example
val activeSeeds: (obj * int) array
val nextSeeds: obj
|
Full Usage:
incrementsSet sqn elv hxo occSet
Parameters:
Sqn
-
Traversal sequence.
elv : int
-
Elevation layer.
hxo : (Hxl * int)[]
-
Array of active (seed hexel, weight) tuples.
occSet : HashSet<Hxl>
-
HashSet of occupied cells.
Returns: (Hxl * int) array
Array of next (hexel, weight) steps for each seed.
|
Advances multiple active cluster seeds simultaneously using a HashSet for high performance.
Example
val occSet: obj
val active: (obj * int) array
val advanced: obj
|
Full Usage:
sequence sqn
Parameters:
Sqn
-
Traversal sequence.
Returns: (int * int)[]
Array of 7 (dx, dy) integer coordinate offset pairs.
|
Sequence Locations: Relative (dx, dy) coordinate offsets of adjacent/neighbouring hexels relative to the host hexel. Index 0 is always the host origin (0, 0), followed by 6 neighboring offsets ordered by sequence heading and chirality.
Example
val offsets: obj
|
|
|
Full Usage:
sqnToString sqn
Parameters:
Sqn
-
Sequence union case.
Returns: string
String name of the sequence.
|
Converts a Sqn sequence union case to its canonical string representation (e.g. "VRCWEE").
Example
val name: obj
|
Full Usage:
toBase34 value
Parameters:
int64
Returns: string
|
Converts an integer coordinate or index to HYWE's compact Base34 string representation (excludes 'I' and 'O').
Example
val b34: obj
|
Active patterns
| Active pattern |
Description
|
|
Hywe