Skip to content
modkitv0.2

Bounding volumes + picking + frustum culling (math/bounds.h)

← All examples41_picking

Demonstrates: - mk_ray_from_screen + mk_ray_hit_aabb: pick the object under the cursor - mk_frustum_from_vp + mk_frustum_test_aabb: cull a grid of boxes The box nearest the camera under the mouse is highlighted; off-screen boxes are culled and counted. Move the mouse / orbit to see picking update. Controls: - Mouse drag: orbit camera - Scroll: zoom

Bounding volumes + picking + frustum culling (math/bounds.h)

Runs the WebAssembly build on this page. Click the canvas to give it keyboard focus.

Number
41
Tags
3d
Source
examples/41_picking/main.c

Build and run

./scripts/build-linux.sh release --target=41_picking --run