cf_cast_ray¶
Category: collision
GitHub: cute_math.h
Casts a ray onto a shape.
bool cf_cast_ray(CF_Ray A, const void* B, const CF_Transform* bx, CF_ShapeType typeB, CF_Raycast* out);
| Parameters | Description |
|---|---|
A |
The ray. |
B |
The shape. |
typeB |
The CF_ShapeType of the shape B. |
bx_ptr |
Can be NULL to represent an identity transform. An optional pointer to a CF_Transform to transform B. |
out |
Can be NULL. CF_Raycast results are placed here (contains normal + time of impact). |
Return Value¶
Returns true if the ray hit the shape.