BRL-CAD
Loading...
Searching...
No Matches
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-2026 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
38
39/* SKETCH specific editing info */
41 int curr_vert; /* index of the currently selected vertex (-1 = none) */
42 int curr_seg; /* index of the currently selected curve segment (-1 = none) */
43 /* Mouse-proximity pick: ft_edit_xy stores cursor here; ft_edit reads it */
44 point_t v_pos; /* view-space cursor position set by ft_edit_xy */
45 int v_pos_valid; /* non-zero when v_pos holds a pending proximity query */
46};
47
48RT_EXPORT extern int rt_check_curve(const struct rt_curve *crv,
49 const struct rt_sketch_internal *skt,
50 int noisy);
51
54
56 const struct rt_curve *crv_in);
57
58RT_EXPORT extern void rt_curve_free(struct rt_curve *crv);
59RT_EXPORT extern void rt_copy_curve(struct rt_curve *crv_out,
60 const struct rt_curve *crv_in);
62
63RT_EXPORT extern struct bv_scene_obj *
64db_sketch_to_scene_obj(const char *sname, struct db_i *dbip, struct directory *dp, struct bview *sv, int flags);
65
66RT_EXPORT extern struct directory *
67db_scene_obj_to_sketch(struct db_i *dbip, const char *sname, struct bv_scene_obj *s);
68
70
71/** @} */
72
73#endif /* RT_PRIMITIVES_SKETCH_H */
74
75/*
76 * Local Variables:
77 * tab-width: 8
78 * mode: C
79 * indent-tabs-mode: t
80 * c-file-style: "stroustrup"
81 * End:
82 * ex: shiftwidth=4 tabstop=8
83 */
Definition dvec.h:74
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)
struct bv_scene_obj * db_sketch_to_scene_obj(const char *sname, struct db_i *dbip, struct directory *dp, struct bview *sv, int flags)
void rt_curve_reverse_segment(uint32_t *lng)
void rt_curve_order_segments(struct rt_curve *crv)
struct directory * db_scene_obj_to_sketch(struct db_i *dbip, const char *sname, struct bv_scene_obj *s)
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 point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition vmath.h:354
void * dp
app obj data
Definition defines.h:209
point_t v_pos
Definition sketch.h:44
int v_pos_valid
Definition sketch.h:45
int curr_vert
Definition sketch.h:41
fundamental vector, matrix, quaternion math macros