Skip to main content

Module shapes

Module shapes 

Source

Structsยง

BlockShapes
Shape data for a block state.
FaceRect ๐Ÿ”’
ShapeId
An ID referencing a registered VoxelShape in the ShapeRegistry.
ShapeRegistry
Registry for VoxelShapes.
VoxelShape
A block-local voxel shape.

Enumsยง

BooleanOp
Vanilla shape boolean operation.
SupportType
Support type for is_face_sturdy checks.

Constantsยง

CENTER_SUPPORT_MAX ๐Ÿ”’
CENTER_SUPPORT_MIN ๐Ÿ”’
Vanilla SupportType.CENTER: Block.column(2.0, 0.0, 10.0).
CENTER_SUPPORT_Y_MAX ๐Ÿ”’
FACE_EPSILON ๐Ÿ”’
FULL_BLOCK_BOXES ๐Ÿ”’
RIGID_BORDER ๐Ÿ”’
Vanilla SupportType.RIGID: Shapes.block() ONLY_FIRST Block.column(12.0, 0.0, 16.0).
VOXEL_EPSILON ๐Ÿ”’

Functionsยง

bounding_box
Returns the overall bounding box of a voxel shape (union of all AABBs).
face_rect_for_aabb ๐Ÿ”’
face_rectangles_cover ๐Ÿ”’
is_face_center_supported
Checks if a shape provides center support on a face.
is_face_full
Checks if a shape fully covers a face (for SupportType::Full).
is_face_rigid_supported
Checks if a shape provides rigid support on a face.
is_face_sturdy
Checks if a shape is sturdy on a face for the given support type.
is_shape_full_block
Checks if a shape is a full block (covers the entire 0-1 cube).
join_is_not_empty
Returns true if applying op to two voxel shapes produces any filled space.
join_unoptimized_boxes
Materializes the unoptimized cell boxes produced by a shape boolean operation.
shape_edges ๐Ÿ”’
shape_fills_cell ๐Ÿ”’
sort_and_dedup_edges ๐Ÿ”’
sort_and_dedup_voxel_edges ๐Ÿ”’