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
2023-01-07 12:49:22 +01:00

32 lines
963 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.. 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