BRL-CAD
aabb_ray.h
Go to the documentation of this file.
1/* A A B B _ R A Y . H
2 * BRL-CAD
3 *
4 * Copyright (c) 2004-2022 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 aabb_ray.h */
23/** @addtogroup bg_aabb_ray */
24/** @{ */
25
26/**
27 * @brief
28 *
29 * Intersection between a ray and an axis-aligned box.
30 *
31 */
32
33#ifndef BG_AABB_RAY_H
34#define BG_AABB_RAY_H
35
36#include "common.h"
37#include "vmath.h"
38#include "bg/defines.h"
39
40__BEGIN_DECLS
41
42BG_EXPORT extern int bg_isect_aabb_ray(fastf_t *r_min, fastf_t *r_max,
43 point_t opt,
44 const fastf_t *invdir, /* inverses of dir[] */
45 const fastf_t *aabb_min,
46 const fastf_t *aabb_max
47 );
48
49__END_DECLS
50
51#endif /* BG_AABB_RAY_H */
52/** @} */
53/*
54 * Local Variables:
55 * mode: C
56 * tab-width: 8
57 * indent-tabs-mode: t
58 * c-file-style: "stroustrup"
59 * End:
60 * ex: shiftwidth=4 tabstop=8
61 */
Header file for the BRL-CAD common definitions.
int bg_isect_aabb_ray(fastf_t *r_min, fastf_t *r_max, point_t opt, const fastf_t *invdir, const fastf_t *aabb_min, const fastf_t *aabb_max)
Intersection between a ray and an axis-aligned box.
double fastf_t
fastest 64-bit (or larger) floating point type
Definition: vmath.h:330
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition: vmath.h:351
fundamental vector, matrix, quaternion math macros