#include <types.h>
◆ Cast()
Casts a ray against all registered world objects and returns a list of hits.
Tests the ray against each world object's bounding volume. Results can optionally be sorted by distance from the ray origin. Objects are filtered by query flags.
This function is equivalent to Ogre's RaySceneQuery and is intended to be called from the render thread. For off-thread usage, queue a pending raycast and process it on the render thread, following the same pattern as the previous Ogre implementation.
- Parameters
-
| ray | Pointer to the world-space ray to cast. |
| sort_by_distance | Whether to sort results nearest-first. |
| max_results | Maximum number of results to return. |
| query_flags | Bitmask to filter which objects are considered. |
- Returns
- A list of BlamRaycastHit entries for each object the ray intersected.
- Author
- Claude (claude-sonnet-4-6)
◆ GetPointAtDistance()
| BlamVector3 BlamRay::GetPointAtDistance |
( |
float |
distance | ) |
|
Returns the world-space point along the ray at the given distance from the origin.
- Parameters
-
| distance | Distance from the ray origin along the ray direction. |
- Returns
- The world-space position at that distance.
- Author
- Claude (claude-sonnet-4-6)
◆ TestRayOBB()
Tests a ray against an oriented bounding box and returns a hit result.
Transforms the ray into the OBB's local coordinate space and performs a standard slab-method AABB intersection test. Returns a hit result with distance and world-space hit point if the ray intersects the box.
- Parameters
-
| ray | Pointer to the ray to test. |
| obb | Pointer to the oriented bounding box to test against. |
| hit_result | Pointer to the result struct to populate if a hit occurs. |
- Returns
- True if the ray intersects the OBB, false otherwise.
- Author
- Claude (claude-sonnet-4-6)
◆ direction
| BlamVector3 BlamRay::direction |
◆ origin
| BlamVector3 BlamRay::origin |
The documentation for this struct was generated from the following files: