Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

Module world_topology

Module world_topology 

Source
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 .psxw convention: 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 true when triangle contains corner.
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§

SplitTriangles
The two triangles that compose a quad.
TriangleCorners
Three corner indices making up one triangle.