BRL-CAD
plot.h
Go to the documentation of this file.
1/* P L O T . H
2 * BRL-CAD
3 *
4 * Copyright (c) 2004-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
21/*----------------------------------------------------------------------*/
22/** @addtogroup nmg_plot
23 */
24/** @{ */
25/** @file nmg/plot.h */
26
27#ifndef NMG_PLOT_H
28#define NMG_PLOT_H
29
30#include "common.h"
31
32#include "vmath.h"
33#include "bu/list.h"
34#include "nmg/defines.h"
35#include "nmg/model.h"
36
37__BEGIN_DECLS
38
39/*
40 * Bit-parameters for nmg_lu_to_vlist() poly_markers code.
41 */
42#define NMG_VLIST_STYLE_VECTOR 0
43#define NMG_VLIST_STYLE_POLYGON 1
44#define NMG_VLIST_STYLE_VISUALIZE_NORMALS 2
45#define NMG_VLIST_STYLE_USE_VU_NORMALS 4
46#define NMG_VLIST_STYLE_NO_SURFACES 8
47
48NMG_EXPORT extern void nmg_pl_shell(FILE *fp,
49 const struct shell *s,
50 int fancy,
51 struct bu_list *vlfree);
52
53NMG_EXPORT extern void nmg_vu_to_vlist(struct bu_list *vhead,
54 const struct vertexuse *vu,
55 struct bu_list *vlfree);
56NMG_EXPORT extern void nmg_eu_to_vlist(struct bu_list *vhead,
57 const struct bu_list *eu_hd,
58 struct bu_list *vlfree);
59NMG_EXPORT extern void nmg_lu_to_vlist(struct bu_list *vhead,
60 const struct loopuse *lu,
61 int poly_markers,
62 const vectp_t norm,
63 struct bu_list *vlfree);
64NMG_EXPORT extern void nmg_snurb_fu_to_vlist(struct bu_list *vhead,
65 const struct faceuse *fu,
66 int poly_markers,
67 struct bu_list *vlfree);
68NMG_EXPORT extern void nmg_s_to_vlist(struct bu_list *vhead,
69 const struct shell *s,
70 int poly_markers,
71 struct bu_list *vlfree);
72NMG_EXPORT extern void nmg_r_to_vlist(struct bu_list *vhead,
73 const struct nmgregion *r,
74 int poly_markers,
75 struct bu_list *vlfree);
76NMG_EXPORT extern void nmg_m_to_vlist(struct bu_list *vhead,
77 struct model *m,
78 int poly_markers,
79 struct bu_list *vlfree);
80NMG_EXPORT extern void nmg_offset_eu_vert(point_t base,
81 const struct edgeuse *eu,
82 const vect_t face_normal,
83 int tip);
84/* plot */
85NMG_EXPORT extern void nmg_pl_v(FILE *fp,
86 const struct vertex *v,
87 long *b);
88NMG_EXPORT extern void nmg_pl_e(FILE *fp,
89 const struct edge *e,
90 long *b,
91 int red,
92 int green,
93 int blue);
94NMG_EXPORT extern void nmg_pl_eu(FILE *fp,
95 const struct edgeuse *eu,
96 long *b,
97 int red,
98 int green,
99 int blue);
100NMG_EXPORT extern void nmg_pl_lu(FILE *fp,
101 const struct loopuse *fu,
102 long *b,
103 int red,
104 int green,
105 int blue,
106 struct bu_list *vlfree);
107NMG_EXPORT extern void nmg_pl_fu(FILE *fp,
108 const struct faceuse *fu,
109 long *b,
110 int red,
111 int green,
112 int blue,
113 struct bu_list *vlfree);
114NMG_EXPORT extern void nmg_pl_s(FILE *fp,
115 const struct shell *s,
116 struct bu_list *vlfree);
117NMG_EXPORT extern void nmg_pl_r(FILE *fp,
118 const struct nmgregion *r,
119 struct bu_list *vlfree);
120NMG_EXPORT extern void nmg_pl_m(FILE *fp,
121 const struct model *m,
122 struct bu_list *vlfree);
123NMG_EXPORT extern void nmg_vlblock_v(struct bv_vlblock *vbp,
124 const struct vertex *v,
125 long *tab,
126 struct bu_list *vlfree);
127NMG_EXPORT extern void nmg_vlblock_e(struct bv_vlblock *vbp,
128 const struct edge *e,
129 long *tab,
130 int red,
131 int green,
132 int blue,
133 struct bu_list *vlfree);
134NMG_EXPORT extern void nmg_vlblock_eu(struct bv_vlblock *vbp,
135 const struct edgeuse *eu,
136 long *tab,
137 int red,
138 int green,
139 int blue,
140 int fancy,
141 struct bu_list *vlfree);
142NMG_EXPORT extern void nmg_vlblock_euleft(struct bu_list *vh,
143 const struct edgeuse *eu,
144 const point_t center,
145 const mat_t mat,
146 const vect_t xvec,
147 const vect_t yvec,
148 double len,
149 struct bu_list *vlfree,
150 const struct bn_tol *tol);
151NMG_EXPORT extern void nmg_vlblock_around_eu(struct bv_vlblock *vbp,
152 const struct edgeuse *arg_eu,
153 long *tab,
154 int fancy,
155 struct bu_list *vlfree,
156 const struct bn_tol *tol);
157NMG_EXPORT extern void nmg_vlblock_lu(struct bv_vlblock *vbp,
158 const struct loopuse *lu,
159 long *tab,
160 int red,
161 int green,
162 int blue,
163 int fancy,
164 struct bu_list *vlfree);
165NMG_EXPORT extern void nmg_vlblock_fu(struct bv_vlblock *vbp,
166 const struct faceuse *fu,
167 long *tab, int fancy, struct bu_list *vlfree);
168NMG_EXPORT extern void nmg_vlblock_s(struct bv_vlblock *vbp,
169 const struct shell *s,
170 int fancy,
171 struct bu_list *vlfree);
172NMG_EXPORT extern void nmg_vlblock_r(struct bv_vlblock *vbp,
173 const struct nmgregion *r,
174 int fancy,
175 struct bu_list *vlfree);
176NMG_EXPORT extern void nmg_vlblock_m(struct bv_vlblock *vbp,
177 const struct model *m,
178 int fancy,
179 struct bu_list *vlfree);
180
181/* visualization helper routines */
182NMG_EXPORT extern void nmg_pl_edges_in_2_shells(struct bv_vlblock *vbp,
183 long *b,
184 const struct edgeuse *eu,
185 int fancy,
186 struct bu_list *vlfree,
187 const struct bn_tol *tol);
188NMG_EXPORT extern void nmg_pl_isect(const char *filename,
189 const struct shell *s,
190 struct bu_list *vlfree,
191 const struct bn_tol *tol);
192NMG_EXPORT extern void nmg_pl_comb_fu(int num1,
193 int num2,
194 const struct faceuse *fu1,
195 struct bu_list *vlfree);
196NMG_EXPORT extern void nmg_pl_2fu(const char *str,
197 const struct faceuse *fu1,
198 const struct faceuse *fu2,
199 int show_mates,
200 struct bu_list *vlfree);
201/* graphical display of classifier results */
202NMG_EXPORT extern void nmg_show_broken_classifier_stuff(uint32_t *p,
203 char **classlist,
204 int all_new,
205 int fancy,
206 const char *a_string,
207 struct bu_list *vlfree);
208NMG_EXPORT extern void nmg_face_plot(const struct faceuse *fu, struct bu_list *vlfree);
209NMG_EXPORT extern void nmg_2face_plot(const struct faceuse *fu1,
210 const struct faceuse *fu2,
211 struct bu_list *vlfree);
212NMG_EXPORT extern void nmg_face_lu_plot(const struct loopuse *lu,
213 const struct vertexuse *vu1,
214 const struct vertexuse *vu2,
215 struct bu_list *vlfree);
216NMG_EXPORT extern void nmg_plot_lu_ray(const struct loopuse *lu,
217 const struct vertexuse *vu1,
218 const struct vertexuse *vu2,
219 const vect_t left,
220 struct bu_list *vlfree);
221NMG_EXPORT extern void nmg_plot_ray_face(const char *fname,
222 point_t pt,
223 const vect_t dir,
224 const struct faceuse *fu,
225 struct bu_list *vlfree);
226NMG_EXPORT extern void nmg_plot_lu_around_eu(const char *prefix,
227 const struct edgeuse *eu,
228 struct bu_list *vlfree,
229 const struct bn_tol *tol);
230NMG_EXPORT extern int nmg_snurb_to_vlist(struct bu_list *vhead,
231 const struct face_g_snurb *fg,
232 int n_interior,
233 struct bu_list *vlfree);
234NMG_EXPORT extern void nmg_cnurb_to_vlist(struct bu_list *vhead,
235 const struct edgeuse *eu,
236 int n_interior,
237 int cmd,
238 struct bu_list *vlfree);
239
240
241__END_DECLS
242
243#endif /* NMG_PLOT_H */
244/** @} */
245/*
246 * Local Variables:
247 * mode: C
248 * tab-width: 8
249 * indent-tabs-mode: t
250 * c-file-style: "stroustrup"
251 * End:
252 * ex: shiftwidth=4 tabstop=8
253 */
Header file for the BRL-CAD common definitions.
void nmg_pl_isect(const char *filename, const struct shell *s, struct bu_list *vlfree, const struct bn_tol *tol)
void nmg_vlblock_euleft(struct bu_list *vh, const struct edgeuse *eu, const point_t center, const mat_t mat, const vect_t xvec, const vect_t yvec, double len, struct bu_list *vlfree, const struct bn_tol *tol)
void nmg_pl_fu(FILE *fp, const struct faceuse *fu, long *b, int red, int green, int blue, struct bu_list *vlfree)
void nmg_snurb_fu_to_vlist(struct bu_list *vhead, const struct faceuse *fu, int poly_markers, struct bu_list *vlfree)
void nmg_lu_to_vlist(struct bu_list *vhead, const struct loopuse *lu, int poly_markers, const vectp_t norm, struct bu_list *vlfree)
void nmg_vlblock_m(struct bv_vlblock *vbp, const struct model *m, int fancy, struct bu_list *vlfree)
void nmg_pl_r(FILE *fp, const struct nmgregion *r, struct bu_list *vlfree)
void nmg_s_to_vlist(struct bu_list *vhead, const struct shell *s, int poly_markers, struct bu_list *vlfree)
void nmg_vu_to_vlist(struct bu_list *vhead, const struct vertexuse *vu, struct bu_list *vlfree)
void nmg_pl_m(FILE *fp, const struct model *m, struct bu_list *vlfree)
void nmg_vlblock_around_eu(struct bv_vlblock *vbp, const struct edgeuse *arg_eu, long *tab, int fancy, struct bu_list *vlfree, const struct bn_tol *tol)
void nmg_m_to_vlist(struct bu_list *vhead, struct model *m, int poly_markers, struct bu_list *vlfree)
void nmg_vlblock_v(struct bv_vlblock *vbp, const struct vertex *v, long *tab, struct bu_list *vlfree)
void nmg_plot_lu_around_eu(const char *prefix, const struct edgeuse *eu, struct bu_list *vlfree, const struct bn_tol *tol)
void nmg_cnurb_to_vlist(struct bu_list *vhead, const struct edgeuse *eu, int n_interior, int cmd, struct bu_list *vlfree)
void nmg_vlblock_e(struct bv_vlblock *vbp, const struct edge *e, long *tab, int red, int green, int blue, struct bu_list *vlfree)
void nmg_pl_edges_in_2_shells(struct bv_vlblock *vbp, long *b, const struct edgeuse *eu, int fancy, struct bu_list *vlfree, const struct bn_tol *tol)
int nmg_snurb_to_vlist(struct bu_list *vhead, const struct face_g_snurb *fg, int n_interior, struct bu_list *vlfree)
void nmg_vlblock_s(struct bv_vlblock *vbp, const struct shell *s, int fancy, struct bu_list *vlfree)
void nmg_pl_comb_fu(int num1, int num2, const struct faceuse *fu1, struct bu_list *vlfree)
void nmg_face_plot(const struct faceuse *fu, struct bu_list *vlfree)
void nmg_plot_lu_ray(const struct loopuse *lu, const struct vertexuse *vu1, const struct vertexuse *vu2, const vect_t left, struct bu_list *vlfree)
void nmg_pl_e(FILE *fp, const struct edge *e, long *b, int red, int green, int blue)
void nmg_pl_shell(FILE *fp, const struct shell *s, int fancy, struct bu_list *vlfree)
void nmg_pl_eu(FILE *fp, const struct edgeuse *eu, long *b, int red, int green, int blue)
void nmg_show_broken_classifier_stuff(uint32_t *p, char **classlist, int all_new, int fancy, const char *a_string, struct bu_list *vlfree)
void nmg_pl_lu(FILE *fp, const struct loopuse *fu, long *b, int red, int green, int blue, struct bu_list *vlfree)
void nmg_vlblock_eu(struct bv_vlblock *vbp, const struct edgeuse *eu, long *tab, int red, int green, int blue, int fancy, struct bu_list *vlfree)
void nmg_eu_to_vlist(struct bu_list *vhead, const struct bu_list *eu_hd, struct bu_list *vlfree)
void nmg_2face_plot(const struct faceuse *fu1, const struct faceuse *fu2, struct bu_list *vlfree)
void nmg_vlblock_lu(struct bv_vlblock *vbp, const struct loopuse *lu, long *tab, int red, int green, int blue, int fancy, struct bu_list *vlfree)
void nmg_offset_eu_vert(point_t base, const struct edgeuse *eu, const vect_t face_normal, int tip)
void nmg_pl_s(FILE *fp, const struct shell *s, struct bu_list *vlfree)
void nmg_r_to_vlist(struct bu_list *vhead, const struct nmgregion *r, int poly_markers, struct bu_list *vlfree)
void nmg_plot_ray_face(const char *fname, point_t pt, const vect_t dir, const struct faceuse *fu, struct bu_list *vlfree)
void nmg_vlblock_r(struct bv_vlblock *vbp, const struct nmgregion *r, int fancy, struct bu_list *vlfree)
void nmg_pl_2fu(const char *str, const struct faceuse *fu1, const struct faceuse *fu2, int show_mates, struct bu_list *vlfree)
void nmg_vlblock_fu(struct bv_vlblock *vbp, const struct faceuse *fu, long *tab, int fancy, struct bu_list *vlfree)
void nmg_face_lu_plot(const struct loopuse *lu, const struct vertexuse *vu1, const struct vertexuse *vu2, struct bu_list *vlfree)
void nmg_pl_v(FILE *fp, const struct vertex *v, long *b)
fastf_t vect_t[ELEMENTS_PER_VECT]
3-tuple vector
Definition: vmath.h:345
fastf_t mat_t[ELEMENTS_PER_MAT]
4x4 matrix
Definition: vmath.h:366
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition: vmath.h:351
fastf_t * vectp_t
pointer to a 3-tuple vector
Definition: vmath.h:348
Definition: tol.h:72
Definition: list.h:131
NMG topological edge.
Definition: topology.h:144
NMG topological edge usage.
Definition: topology.h:155
Face NURBS surface geometry.
Definition: topology.h:392
NMG topological face usage.
Definition: topology.h:230
NMG topological loop usage.
Definition: topology.h:192
NMG topological model.
Definition: topology.h:289
NMG topological region.
Definition: topology.h:277
NMG topological shell.
Definition: topology.h:261
NMG topological vertex - the simplest element of the topology system.
Definition: topology.h:98
NMG topological vertex usage.
Definition: topology.h:109
fundamental vector, matrix, quaternion math macros