BRL-CAD
tri_ray.h
Go to the documentation of this file.
1
/* T R I _ R A Y . H
2
* BRL-CAD
3
*
4
* Copyright (c) 2004-2023 United States Government as represented by
5
* the U.S. Army Research Laboratory.
6
*
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public License
9
* version 2.1 as published by the Free Software Foundation.
10
*
11
* This library is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this file; see the file named COPYING for more
18
* information.
19
*/
20
21
/*----------------------------------------------------------------------*/
22
/* @file tri_ray.h */
23
/** @addtogroup bg_tri_ray */
24
/** @{ */
25
26
/**
27
* @brief
28
* Möller & Trumbore's triangle/ray intersection test
29
*
30
* From the article
31
*
32
* "Fast, Minimal Storage Ray-Triangle Intersection",
33
* Journal of Graphics Tools, 2(1):21-28, 1997
34
*
35
*/
36
37
#ifndef BG_TRI_RAY_H
38
#define BG_TRI_RAY_H
39
40
#include "
common.h
"
41
#include "
vmath.h
"
42
#include "
bg/defines.h
"
43
44
__BEGIN_DECLS
45
46
BG_EXPORT
extern
int
bg_isect_tri_ray
(
const
point_t
orig,
47
const
point_t
dir,
48
const
point_t
vert0,
49
const
point_t
vert1,
50
const
point_t
vert2,
51
point_t
*isect);
52
53
54
__END_DECLS
55
56
#endif
/* BG_TRI_RAY_H */
57
/** @} */
58
/*
59
* Local Variables:
60
* mode: C
61
* tab-width: 8
62
* indent-tabs-mode: t
63
* c-file-style: "stroustrup"
64
* End:
65
* ex: shiftwidth=4 tabstop=8
66
*/
defines.h
common.h
Header file for the BRL-CAD common definitions.
bg_isect_tri_ray
int bg_isect_tri_ray(const point_t orig, const point_t dir, const point_t vert0, const point_t vert1, const point_t vert2, point_t *isect)
Möller & Trumbore's triangle/ray intersection test.
point_t
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition:
vmath.h:351
vmath.h
fundamental vector, matrix, quaternion math macros
include
bg
tri_ray.h
Generated on Tue Mar 7 2023 23:41:49 for BRL-CAD by
1.9.3