Expand description
Shared topology helpers for cooked world quads and wall shapes.
Constants§
- HORIZONTAL_
NE_ SW_ TRIANGLES - Triangle indices for a horizontal NE-SW split.
- HORIZONTAL_
NW_ SE_ TRIANGLES - Triangle indices for a horizontal NW-SE split.
- SPLIT_
ONE_ THREE_ TRIANGLES - Triangles for a split from corner 1 to corner 3.
- SPLIT_
ZERO_ TWO_ TRIANGLES - Triangles for a split from corner 0 to corner 2.
- WHOLE_
QUAD_ TRIANGLE_ INDEX - Triangle index used by runtime caches for unsplit whole quads.
Functions§
- horizontal_
triangle_ at_ local - Runtime horizontal triangle for a local X/Z point. Coordinates
use the
.psxwconvention: local Z=0 is the north edge. - split_
triangle - Resolve one triangle for
split_id. Indices other than zero select the second triangle. - split_
triangles - Resolve a split id to the two triangle corner sets. Unknown split ids fall back to NW-SE so malformed data still draws a coherent full surface.
- triangle_
contains_ corner - Return
truewhentrianglecontainscorner. - wall_
shape_ for_ dropped_ corner - Shape id for removing one wall corner.
- wall_
shape_ triangle - Surviving triangle for a dropped-corner wall shape. The
returned split id uses the generic quad-corner numbering:
[bottom-left, bottom-right, top-right, top-left]. - wall_
shape_ triangle_ corners - Wall-corner members for the triangle surviving
shape.
Type Aliases§
- Split
Triangles - The two triangles that compose a quad.
- Triangle
Corners - Three corner indices making up one triangle.