-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
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
- Implement
Ray { origin, direction }andCamera::generateRay(mouseX, mouseY, vpW, vpH)using inverse VP matrix - Implement
Primitive::raycastVertex(ray, threshold)- returns index of closest vertex within screen-space threshold - Implement
Primitive::raycastFace(ray)- Moller-Trumbore intersection, returns hit face index - Add
SelectionManagerclass: current mode (VERTEX/FACE), active primitive pointer,handleClick(ray)dispatcher - Support additive selection (Shift+click) vs replace (plain click)
- Draw selected vertices as
GL_POINTSoverlay with highlight color - Draw selected faces with a highlight color pass after main draw
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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels