BRL-CAD
htbl.h
Go to the documentation of this file.
1 /* H T B L . H
2  * BRL-CAD
3  *
4  * Copyright (c) 1993-2024 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 /** @file rt/htbl.h
21  *
22  */
23 
24 #ifndef RT_HTBL_H
25 #define RT_HTBL_H
26 
27 #include "common.h"
28 #include "vmath.h"
29 #include "rt/defines.h"
30 
31 __BEGIN_DECLS
32 
33 /* htbl.c */
34 
35 RT_EXPORT extern void rt_htbl_init(struct rt_htbl *b, size_t len, const char *str);
36 
37 /**
38  * Reset the table to have no elements, but retain any existing storage.
39  */
40 RT_EXPORT extern void rt_htbl_reset(struct rt_htbl *b);
41 
42 /**
43  * Deallocate dynamic hit buffer and render unusable without a
44  * subsequent rt_htbl_init().
45  */
46 RT_EXPORT extern void rt_htbl_free(struct rt_htbl *b);
47 
48 /**
49  * Allocate another hit structure, extending the array if necessary.
50  */
51 RT_EXPORT extern struct hit *rt_htbl_get(struct rt_htbl *b);
52 
53 
54 __END_DECLS
55 
56 #endif /* RT_HTBL_H */
57 
58 /*
59  * Local Variables:
60  * tab-width: 8
61  * mode: C
62  * indent-tabs-mode: t
63  * c-file-style: "stroustrup"
64  * End:
65  * ex: shiftwidth=4 tabstop=8
66  */
Header file for the BRL-CAD common definitions.
void rt_htbl_free(struct rt_htbl *b)
void rt_htbl_init(struct rt_htbl *b, size_t len, const char *str)
struct hit * rt_htbl_get(struct rt_htbl *b)
void rt_htbl_reset(struct rt_htbl *b)
Information about where a ray hits the surface.
Definition: hit.h:61
Definition: piece.h:41
fundamental vector, matrix, quaternion math macros