mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
suppress documentation warnings
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
* @param[in] v1 second vertex of triangle
|
* @param[in] v1 second vertex of triangle
|
||||||
* @param[in] v2 third vertex of triangle
|
* @param[in] v2 third vertex of triangle
|
||||||
* @param[in, out] d distance to intersection
|
* @param[in, out] d distance to intersection
|
||||||
* @param[out] intersection whether there is intersection
|
* @return whether there is intersection
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
@@ -46,29 +46,25 @@ glm_ray_triangle(vec3 origin,
|
|||||||
|
|
||||||
glm_vec3_sub(v1, v0, edge1);
|
glm_vec3_sub(v1, v0, edge1);
|
||||||
glm_vec3_sub(v2, v0, edge2);
|
glm_vec3_sub(v2, v0, edge2);
|
||||||
|
|
||||||
glm_vec3_cross(direction, edge2, p);
|
glm_vec3_cross(direction, edge2, p);
|
||||||
|
|
||||||
det = glm_vec3_dot(edge1, p);
|
det = glm_vec3_dot(edge1, p);
|
||||||
|
|
||||||
if (det > -epsilon && det < epsilon)
|
if (det > -epsilon && det < epsilon)
|
||||||
return 0;
|
return false;
|
||||||
|
|
||||||
inv_det = 1.0f / det;
|
inv_det = 1.0f / det;
|
||||||
|
|
||||||
glm_vec3_sub(origin, v0, t);
|
glm_vec3_sub(origin, v0, t);
|
||||||
|
|
||||||
u = inv_det * glm_vec3_dot(t, p);
|
u = inv_det * glm_vec3_dot(t, p);
|
||||||
|
|
||||||
if (u < 0.0f || u > 1.0f)
|
if (u < 0.0f || u > 1.0f)
|
||||||
return 0;
|
return false;
|
||||||
|
|
||||||
glm_vec3_cross(t, edge1, q);
|
glm_vec3_cross(t, edge1, q);
|
||||||
|
|
||||||
v = inv_det * glm_vec3_dot(direction, q);
|
v = inv_det * glm_vec3_dot(direction, q);
|
||||||
|
|
||||||
if (v < 0.0f || u + v > 1.0f)
|
if (v < 0.0f || u + v > 1.0f)
|
||||||
return 0;
|
return false;
|
||||||
|
|
||||||
dist = inv_det * glm_vec3_dot(edge2, q);
|
dist = inv_det * glm_vec3_dot(edge2, q);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user