This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
Wotos-mpv/lib/cglm/docs/source/ray.rst

32 lines
963 B
ReStructuredText
Raw Normal View History

2023-01-07 11:49:22 +00:00
.. default-domain:: C
ray
====
Header: cglm/ray.h
This is for collision-checks used by ray-tracers and the like.
Table of contents (click to go):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Functions:
1. :c:func:`glm_ray_triangle`
Functions documentation
~~~~~~~~~~~~~~~~~~~~~~~
.. c:function:: bool glm_ray_triangle(vec3 origin, vec3 direction, vec3 v0, vec3 v1, vec3 v2, float *d)
MöllerTrumbore ray-triangle intersection algorithm
Parameters:
| *[in]* **origin** origin of ray
| *[in]* **direction** direction of ray
| *[in]* **v0** first vertex of triangle
| *[in]* **v1** second vertex of triangle
| *[in]* **v2** third vertex of triangle
| *[in, out]* **d** float pointer to save distance to intersection
| *[out]* **intersection** whether there is intersection