BRL-CAD
sketch.h
Go to the documentation of this file.
1 /* S K E T C H . 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 /** @addtogroup rt_sketch */
21 /** @{ */
22 /** @file rt/primitives/sketch.h */
23 
24 #ifndef RT_PRIMITIVES_SKETCH_H
25 #define RT_PRIMITIVES_SKETCH_H
26 
27 #include "common.h"
28 #include "vmath.h"
29 #include "bu/list.h"
30 #include "bu/vls.h"
31 #include "bn/tol.h"
32 #include "bv/defines.h"
33 #include "rt/defines.h"
34 #include "rt/directory.h"
35 #include "rt/db_instance.h"
36 
37 __BEGIN_DECLS
38 
39 RT_EXPORT extern int curve_to_vlist(struct bu_list *vlfree,
40  struct bu_list *vhead,
41  const struct bg_tess_tol *ttol,
42  point_t V,
43  vect_t u_vec,
44  vect_t v_vec,
45  struct rt_sketch_internal *sketch_ip,
46  struct rt_curve *crv);
47 
48 RT_EXPORT extern int rt_check_curve(const struct rt_curve *crv,
49  const struct rt_sketch_internal *skt,
50  int noisy);
51 
52 RT_EXPORT extern void rt_curve_reverse_segment(uint32_t *lng);
53 RT_EXPORT extern void rt_curve_order_segments(struct rt_curve *crv);
54 
55 RT_EXPORT extern void rt_copy_curve(struct rt_curve *crv_out,
56  const struct rt_curve *crv_in);
57 
58 RT_EXPORT extern void rt_curve_free(struct rt_curve *crv);
59 RT_EXPORT extern void rt_copy_curve(struct rt_curve *crv_out,
60  const struct rt_curve *crv_in);
61 RT_EXPORT extern struct rt_sketch_internal *rt_copy_sketch(const struct rt_sketch_internal *sketch_ip);
62 RT_EXPORT extern int curve_to_tcl_list(struct bu_vls *vls,
63  struct rt_curve *crv);
64 
65 RT_EXPORT extern struct bv_scene_obj *
66 db_sketch_to_scene_obj(const char *sname, struct db_i *dbip, struct directory *dp, struct bview *sv, int flags);
67 
68 RT_EXPORT extern struct directory *
69 db_scene_obj_to_sketch(struct db_i *dbip, const char *sname, struct bv_scene_obj *s);
70 
71 __END_DECLS
72 
73 /** @} */
74 
75 #endif /* RT_PRIMITIVES_SKETCH_H */
76 
77 /*
78  * Local Variables:
79  * tab-width: 8
80  * mode: C
81  * indent-tabs-mode: t
82  * c-file-style: "stroustrup"
83  * End:
84  * ex: shiftwidth=4 tabstop=8
85  */
Header file for the BRL-CAD common definitions.
void rt_curve_free(struct rt_curve *crv)
int rt_check_curve(const struct rt_curve *crv, const struct rt_sketch_internal *skt, int noisy)
int curve_to_tcl_list(struct bu_vls *vls, struct rt_curve *crv)
void rt_curve_reverse_segment(uint32_t *lng)
struct bv_scene_obj * db_sketch_to_scene_obj(const char *sname, struct db_i *dbip, struct directory *dp, struct bview *sv, int flags)
struct directory * db_scene_obj_to_sketch(struct db_i *dbip, const char *sname, struct bv_scene_obj *s)
void rt_curve_order_segments(struct rt_curve *crv)
int curve_to_vlist(struct bu_list *vlfree, struct bu_list *vhead, const struct bg_tess_tol *ttol, point_t V, vect_t u_vec, vect_t v_vec, struct rt_sketch_internal *sketch_ip, struct rt_curve *crv)
struct rt_sketch_internal * rt_copy_sketch(const struct rt_sketch_internal *sketch_ip)
void rt_copy_curve(struct rt_curve *crv_out, const struct rt_curve *crv_in)
fastf_t vect_t[ELEMENTS_PER_VECT]
3-tuple vector
Definition: vmath.h:349
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition: vmath.h:355
Definition: list.h:132
Definition: vls.h:53
void * dp
app obj data
Definition: defines.h:202
Definition: defines.h:489
Definition: geom.h:603
fundamental vector, matrix, quaternion math macros