ADD: spot light

This commit is contained in:
2025-12-20 23:43:34 +09:00
parent 9ebc01b3a9
commit 0ec865e0ee
15 changed files with 585 additions and 5 deletions

View File

@@ -127,6 +127,23 @@ Notes:
- On level load: call `addPointLight` for each baked/runtime point light.
- At runtime (e.g. gameplay): read/modify lights via the indexed helpers.
### Spot Lights
- `SceneManager::SpotLight`
- `position_world` worldspace position.
- `direction` worldspace unit direction (cone axis).
- `radius` approximate influence radius (used for falloff).
- `inner_angle_deg`, `outer_angle_deg` cone halfangles in degrees (inner ≤ outer).
- `color` RGB color.
- `intensity` scalar brightness.
- API
- `addSpotLight(const SpotLight &light)`
- `clearSpotLights()`
- `getSpotLightCount()`, `getSpotLight(index, outLight)`, `setSpotLight(index, light)`, `removeSpotLight(index)`
- Usage pattern
- On level load: call `addSpotLight` for each flashlight/beam/cone light.
- At runtime: read/modify lights via the indexed helpers.
### Picking & Selection (GameFacing)
The scene system exposes CPU raybased picking and rectangle selection that the engine uses for editor tools, but you can also call them directly from game code.