Skip to main content

cmp_render_order

Function cmp_render_order 

Source
pub fn cmp_render_order(
    viewer: impl Viewer,
    obj0: impl Object,
    obj1: impl Object,
) -> Ordering
Expand description

Compare function for sorting objects based on distance from the viewer. The order is opaque objects from nearest to farthest away from the viewer, then transparent objects from farthest away to closest to the viewer.