BRL-CAD
arb8.h
Go to the documentation of this file.
1/* A R B 8 . H
2 * BRL-CAD
3 *
4 * Copyright (c) 1993-2023 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_arb */
21/** @{ */
22/** @file rt/primitives/arb8.h */
23
24#ifndef RT_PRIMITIVES_ARB8_H
25#define RT_PRIMITIVES_ARB8_H
26
27#include "common.h"
28#include "vmath.h"
29#include "bn/tol.h"
30#include "rt/defines.h"
31#include "rt/db_instance.h"
32#include "rt/db_internal.h"
33#include "rt/wdb.h"
34
35__BEGIN_DECLS
36
37/* arb8.c */
38RT_EXPORT extern int rt_arb_get_cgtype(
39 int *cgtype,
40 struct rt_arb_internal *arb,
41 const struct bn_tol *tol,
42 int *uvec, /* array of indexes to unique points in arb->pt[] */
43 int *svec); /* array of indexes to like points in arb->pt[] */
44RT_EXPORT extern int rt_arb_std_type(const struct rt_db_internal *ip,
45 const struct bn_tol *tol);
46RT_EXPORT extern void rt_arb_centroid(point_t *cent,
47 const struct rt_db_internal *ip);
48RT_EXPORT extern int rt_arb_calc_points(struct rt_arb_internal *arb, int cgtype, const plane_t planes[6], const struct bn_tol *tol); /* needs wdb.h for arg list */
49RT_EXPORT extern int rt_arb_check_points(struct rt_arb_internal *arb,
50 int cgtype,
51 const struct bn_tol *tol);
52RT_EXPORT extern int rt_arb_3face_intersect(point_t point,
53 const plane_t planes[6],
54 int type, /* 4..8 */
55 int loc);
56RT_EXPORT extern int rt_arb_calc_planes(struct bu_vls *error_msg_ret,
57 struct rt_arb_internal *arb,
58 int type,
59 plane_t planes[6],
60 const struct bn_tol *tol);
61RT_EXPORT extern int rt_arb_move_edge(struct bu_vls *error_msg_ret,
62 struct rt_arb_internal *arb,
63 vect_t thru,
64 int bp1,
65 int bp2,
66 int end1,
67 int end2,
68 const vect_t dir,
69 plane_t planes[6],
70 const struct bn_tol *tol);
71RT_EXPORT extern int rt_arb_edit(struct bu_vls *error_msg_ret,
72 struct rt_arb_internal *arb,
73 int arb_type,
74 int edit_type,
75 vect_t pos_model,
76 plane_t planes[6],
77 const struct bn_tol *tol);
78RT_EXPORT extern int rt_arb_find_e_nearest_pt2(int *edge, int *vert1, int *vert2, const struct rt_db_internal *ip, const point_t pt2, const mat_t mat, fastf_t ptol);
79
80
81__END_DECLS
82
83/** @} */
84#endif /* RT_PRIMITIVES_ARB8_H */
85
86/*
87 * Local Variables:
88 * tab-width: 8
89 * mode: C
90 * indent-tabs-mode: t
91 * c-file-style: "stroustrup"
92 * End:
93 * ex: shiftwidth=4 tabstop=8
94 */
Header file for the BRL-CAD common definitions.
int rt_arb_move_edge(struct bu_vls *error_msg_ret, struct rt_arb_internal *arb, vect_t thru, int bp1, int bp2, int end1, int end2, const vect_t dir, plane_t planes[6], const struct bn_tol *tol)
int rt_arb_get_cgtype(int *cgtype, struct rt_arb_internal *arb, const struct bn_tol *tol, int *uvec, int *svec)
void rt_arb_centroid(point_t *cent, const struct rt_db_internal *ip)
int rt_arb_3face_intersect(point_t point, const plane_t planes[6], int type, int loc)
int rt_arb_calc_planes(struct bu_vls *error_msg_ret, struct rt_arb_internal *arb, int type, plane_t planes[6], const struct bn_tol *tol)
int rt_arb_calc_points(struct rt_arb_internal *arb, int cgtype, const plane_t planes[6], const struct bn_tol *tol)
int rt_arb_find_e_nearest_pt2(int *edge, int *vert1, int *vert2, const struct rt_db_internal *ip, const point_t pt2, const mat_t mat, fastf_t ptol)
int rt_arb_edit(struct bu_vls *error_msg_ret, struct rt_arb_internal *arb, int arb_type, int edit_type, vect_t pos_model, plane_t planes[6], const struct bn_tol *tol)
int rt_arb_check_points(struct rt_arb_internal *arb, int cgtype, const struct bn_tol *tol)
int rt_arb_std_type(const struct rt_db_internal *ip, const struct bn_tol *tol)
fastf_t vect_t[ELEMENTS_PER_VECT]
3-tuple vector
Definition: vmath.h:345
double fastf_t
fastest 64-bit (or larger) floating point type
Definition: vmath.h:330
fastf_t mat_t[ELEMENTS_PER_MAT]
4x4 matrix
Definition: vmath.h:366
fastf_t plane_t[ELEMENTS_PER_PLANE]
Definition of a plane equation.
Definition: vmath.h:393
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition: vmath.h:351
Definition: tol.h:72
Definition: vls.h:53
NMG topological edge.
Definition: topology.h:144
fundamental vector, matrix, quaternion math macros