Labels: interaction raycasting
Estimate: 1 week
Context
Editing is useless without selection. This issue adds raycasting from the camera through the mouse cursor to identify the closest vertex or face in the active primitive.
Tasks
Acceptance Criteria
- Clicking a vertex selects it, confirmed by visual highlight
- Clicking a face in face mode selects it
- Shift+click adds to selection without clearing existing
- Clicking empty space clears selection
- Selection works correctly after camera movement
Files
src/Modeling/SelectionManager.hpp (new)
src/Modeling/SelectionManager.cpp (new)
src/Camera/camera.hpp / .cpp
src/Geometries/primitives.hpp / .cpp
src/Shaders/selection.vert / .frag (new)
Labels:
interactionraycastingEstimate: 1 week
Context
Editing is useless without selection. This issue adds raycasting from the camera through the mouse cursor to identify the closest vertex or face in the active primitive.
Tasks
Ray { origin, direction }andCamera::generateRay(mouseX, mouseY, vpW, vpH)using inverse VP matrixPrimitive::raycastVertex(ray, threshold)- returns index of closest vertex within screen-space thresholdPrimitive::raycastFace(ray)- Moller-Trumbore intersection, returns hit face indexSelectionManagerclass: current mode (VERTEX/FACE), active primitive pointer,handleClick(ray)dispatcherGL_POINTSoverlay with highlight colorAcceptance Criteria
Files