BRL-CAD
Loading...
Searching...
No Matches
snap.h
Go to the documentation of this file.
1/* S N A P . H
2 * BRL-CAD
3 *
4 * Copyright (c) 1993-2025 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 bv_snap
21 *
22 * @brief Logic for snapping sample points to view elements and grids.
23 *
24 */
25/** @{ */
26/** @file bv/snap.h */
27
28#ifndef BV_SNAP_H
29#define BV_SNAP_H
30
31#include "common.h"
32#include "vmath.h"
33#include "bv/defines.h"
34
36
37/* Logic for snapping points to their closes view lines. */
38
39/* Snap sample 2D point to lines active in the view. If populated,
40 * v->gv_s->gv_snap_objs contains a subset of bv_scene_obj pointers indicating
41 * which view objects to consider for snapping. If nonzero,
42 * v->gv_s->gv_snap_flags also tells the routine which categories of objects to
43 * consider - objs objects will also be evaluated against the flags before
44 * being used. */
46
48
49BV_EXPORT extern int bv_snap_lines_3d(point_t *out_pt, struct bview *v, point_t *p);
51
53
54#endif /* BV_SNAP_H */
55
56/** @} */
57/*
58 * Local Variables:
59 * mode: C
60 * tab-width: 8
61 * indent-tabs-mode: t
62 * c-file-style: "stroustrup"
63 * End:
64 * ex: shiftwidth=4 tabstop=8
65 */
Definition dvec.h:74
Header file for the BRL-CAD common definitions.
void float float * fy
Definition tig.h:283
void float * fx
Definition tig.h:282
int bv_snap_lines_3d(point_t *out_pt, struct bview *v, point_t *p)
int bv_snap_grid_2d(struct bview *v, fastf_t *fx, fastf_t *fy)
int bv_snap_lines_2d(struct bview *v, fastf_t *fx, fastf_t *fy)
void bv_view_center_linesnap(struct bview *v)
double fastf_t
fastest 64-bit (or larger) floating point type
Definition vmath.h:334
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition vmath.h:355
fundamental vector, matrix, quaternion math macros