BRL-CAD
Loading...
Searching...
No Matches
functab.h
Go to the documentation of this file.
1/* R T _ F U N C T A B . 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 rt_functab
21 * @brief Object-oriented interface to BRL-CAD geometry.
22 *
23 * These are the methods for a notional object class "brlcad_solid".
24 * The data for each instance is found separately in struct soltab.
25 * This table is indexed by ID_xxx value of particular solid found in
26 * st_id, or directly pointed at by st_meth.
27 *
28 */
29/** @{ */
30/** @file rt/functab.h */
31
32#ifndef RT_FUNCTAB_H
33#define RT_FUNCTAB_H
34
35#include "common.h"
36#include "vmath.h"
37#include "bu/parse.h"
38#include "bu/vls.h"
39#include "bn/tol.h"
40#include "bv.h"
41#include "rt/geom.h"
42#include "rt/defines.h"
43#include "rt/application.h"
44#include "rt/db_internal.h"
45#include "rt/db_instance.h"
46#include "rt/directory.h"
47#include "rt/edit.h"
48#include "rt/hit.h"
49#include "rt/misc.h"
50#include "rt/resource.h"
51#include "rt/rt_instance.h"
52#include "rt/seg.h"
53#include "rt/soltab.h"
54#include "rt/tol.h"
55#include "rt/view.h"
56#include "rt/xray.h"
57#include "pc.h"
58#include "nmg.h"
59#include "brep.h"
60
61
63
64/**
65 * This needs to be at the end of the raytrace.h header file, so that
66 * all the structure names are known. The "union record" and "struct
67 * nmgregion" pointers are problematic, so generic pointers are used
68 * when those header files have not yet been seen.
69 *
70 * DEPRECATED: the size of this structure will likely change with new
71 * size for ft_label and new object callbacks.
72 */
73struct rt_functab {
75 char ft_name[17]; /* current longest name is 16 chars, need one element for terminating NULL */
76 char ft_label[9]; /* current longest label is 8 chars, need one element for terminating NULL */
77
79
80 int (*ft_prep)(struct soltab *stp,
81 struct rt_db_internal *ip,
82 struct rt_i *rtip);
83#define RTFUNCTAB_FUNC_PREP_CAST(_func) ((int (*)(struct soltab *, struct rt_db_internal *, struct rt_i *))((void (*)(void))_func))
84
85 int (*ft_shot)(struct soltab *stp,
86 struct xray *rp,
87 struct application *ap, /* has resource */
88 struct seg *seghead);
89#define RTFUNCTAB_FUNC_SHOT_CAST(_func) ((int (*)(struct soltab *, struct xray *, struct application *, struct seg *))((void (*)(void))_func))
90
91 void (*ft_print)(const struct soltab *stp);
92#define RTFUNCTAB_FUNC_PRINT_CAST(_func) ((void (*)(const struct soltab *))((void (*)(void))_func))
93
94 void (*ft_norm)(struct hit *hitp,
95 struct soltab *stp,
96 struct xray *rp);
97#define RTFUNCTAB_FUNC_NORM_CAST(_func) ((void (*)(struct hit *, struct soltab *, struct xray *))((void (*)(void))_func))
98
100 struct rt_piecelist *plp,
101 double dist, /* correction to apply to hit distances */
102 struct xray *ray, /* ray transformed to be near cut cell */
103 struct application *ap, /* has resource */
104 struct seg *seghead); /* used only for PLATE mode hits */
105#define RTFUNCTAB_FUNC_PIECE_SHOT_CAST(_func) ((int (*)(struct rt_piecestate *, struct rt_piecelist *, double dist, struct xray *, struct application *, struct seg *))((void (*)(void))_func))
106
108 struct seg *seghead,
109 struct application *ap); /* has resource */
110#define RTFUNCTAB_FUNC_PIECE_HITSEGS_CAST(_func) ((void (*)(struct rt_piecestate *, struct seg *, struct application *))((void (*)(void))_func))
111
112 void (*ft_uv)(struct application *ap, /* has resource */
113 struct soltab *stp,
114 struct hit *hitp,
115 struct uvcoord *uvp);
116#define RTFUNCTAB_FUNC_UV_CAST(_func) ((void (*)(struct application *, struct soltab *, struct hit *, struct uvcoord *))((void (*)(void))_func))
117
119 struct hit *hitp,
120 struct soltab *stp);
121#define RTFUNCTAB_FUNC_CURVE_CAST(_func) ((void (*)(struct curvature *, struct hit *, struct soltab *))((void (*)(void))_func))
122
123 int (*ft_classify)(const struct soltab * /*stp*/, const vect_t /*min*/, const vect_t /*max*/, const struct bn_tol * /*tol*/);
124#define RTFUNCTAB_FUNC_CLASS_CAST(_func) ((int (*)(const struct soltab *, const vect_t, const vect_t, const struct bn_tol *))((void (*)(void))_func))
125
126 void (*ft_free)(struct soltab * /*stp*/);
127#define RTFUNCTAB_FUNC_FREE_CAST(_func) ((void (*)(struct soltab *))((void (*)(void))_func))
128
129 int (*ft_plot)(struct bu_list * /*vhead*/,
130 struct rt_db_internal * /*ip*/,
131 const struct bg_tess_tol * /*ttol*/,
132 const struct bn_tol * /*tol*/,
133 const struct bview * /*view info*/);
134#define RTFUNCTAB_FUNC_PLOT_CAST(_func) ((int (*)(struct bu_list *, struct rt_db_internal *, const struct bg_tess_tol *, const struct bn_tol *, const struct bview *))((void (*)(void))_func))
135
136 int (*ft_adaptive_plot)(struct bu_list * /*vhead*/,
137 struct rt_db_internal * /*ip*/,
138 const struct bn_tol * /*tol*/,
139 const struct bview * /* view info */,
140 fastf_t /* s_size */);
141#define RTFUNCTAB_FUNC_ADAPTIVE_PLOT_CAST(_func) ((int (*)(struct bu_list *, struct rt_db_internal *, const struct bn_tol *, const struct bview *, fastf_t))((void (*)(void))_func))
142
143 void (*ft_vshot)(struct soltab * /*stp*/[],
144 struct xray *[] /*rp*/,
145 struct seg * /*segp*/,
146 int /*n*/,
147 struct application * /*ap*/);
148#define RTFUNCTAB_FUNC_VSHOT_CAST(_func) ((void (*)(struct soltab *[], struct xray *[], struct seg *, int, struct application *))((void (*)(void))_func))
149
150 int (*ft_tessellate)(struct nmgregion ** /*r*/,
151 struct model * /*m*/,
152 struct rt_db_internal * /*ip*/,
153 const struct bg_tess_tol * /*ttol*/,
154 const struct bn_tol * /*tol*/);
155#define RTFUNCTAB_FUNC_TESS_CAST(_func) ((int (*)(struct nmgregion **, struct model *, struct rt_db_internal *, const struct bg_tess_tol *, const struct bn_tol *))((void (*)(void))_func))
156 int (*ft_tnurb)(struct nmgregion ** /*r*/,
157 struct model * /*m*/,
158 struct rt_db_internal * /*ip*/,
159 const struct bn_tol * /*tol*/);
160#define RTFUNCTAB_FUNC_TNURB_CAST(_func) ((int (*)(struct nmgregion **, struct model *, struct rt_db_internal *, const struct bn_tol *))((void (*)(void))_func))
161
162 void (*ft_brep)(ON_Brep ** /*b*/,
163 struct rt_db_internal * /*ip*/,
164 const struct bn_tol * /*tol*/);
165#define RTFUNCTAB_FUNC_BREP_CAST(_func) ((void (*)(ON_Brep **, struct rt_db_internal *, const struct bn_tol *))((void (*)(void))_func))
166
167 int (*ft_import5)(struct rt_db_internal * /*ip*/,
168 const struct bu_external * /*ep*/,
169 const mat_t /*mat*/,
170 const struct db_i * /*dbip*/,
171 struct resource * /*resp*/);
172#define RTFUNCTAB_FUNC_IMPORT5_CAST(_func) ((int (*)(struct rt_db_internal *, const struct bu_external *, const mat_t, const struct db_i *, struct resource *))((void (*)(void))_func))
173
174 int (*ft_export5)(struct bu_external * /*ep*/,
175 const struct rt_db_internal * /*ip*/,
176 double /*local2mm*/,
177 const struct db_i * /*dbip*/,
178 struct resource * /*resp*/);
179#define RTFUNCTAB_FUNC_EXPORT5_CAST(_func) ((int (*)(struct bu_external *, const struct rt_db_internal *, double, const struct db_i *, struct resource *))((void (*)(void))_func))
180
181 int (*ft_import4)(struct rt_db_internal * /*ip*/,
182 const struct bu_external * /*ep*/,
183 const mat_t /*mat*/,
184 const struct db_i * /*dbip*/,
185 struct resource * /*resp*/);
186#define RTFUNCTAB_FUNC_IMPORT4_CAST(_func) ((int (*)(struct rt_db_internal *, const struct bu_external *, const mat_t, const struct db_i *, struct resource *))((void (*)(void))_func))
187
188 int (*ft_export4)(struct bu_external * /*ep*/,
189 const struct rt_db_internal * /*ip*/,
190 double /*local2mm*/,
191 const struct db_i * /*dbip*/,
192 struct resource * /*resp*/);
193#define RTFUNCTAB_FUNC_EXPORT4_CAST(_func) ((int (*)(struct bu_external *, const struct rt_db_internal *, double, const struct db_i *, struct resource *))((void (*)(void))_func))
194
195 void (*ft_ifree)(struct rt_db_internal * /*ip*/);
196#define RTFUNCTAB_FUNC_IFREE_CAST(_func) ((void (*)(struct rt_db_internal *))((void (*)(void))_func))
197
198 int (*ft_describe)(struct bu_vls * /*str*/,
199 const struct rt_db_internal * /*ip*/,
200 int /*verbose*/,
201 double /*mm2local*/);
202#define RTFUNCTAB_FUNC_DESCRIBE_CAST(_func) ((int (*)(struct bu_vls *, const struct rt_db_internal *, int, double))((void (*)(void))_func))
203
204 int (*ft_xform)(struct rt_db_internal * /*op*/,
205 const mat_t /*mat*/, struct rt_db_internal * /*ip*/,
206 int /*free*/, struct db_i * /*dbip*/);
207#define RTFUNCTAB_FUNC_XFORM_CAST(_func) ((int (*)(struct rt_db_internal *, const mat_t, struct rt_db_internal *, int, struct db_i *))((void (*)(void))_func))
208
209 const struct bu_structparse *ft_parsetab; /**< @brief rt_xxx_parse */
210 size_t ft_internal_size; /**< @brief sizeof(struct rt_xxx_internal) */
211 uint32_t ft_internal_magic; /**< @brief RT_XXX_INTERNAL_MAGIC */
212
213 int (*ft_get)(struct bu_vls *, const struct rt_db_internal *, const char *item);
214#define RTFUNCTAB_FUNC_GET_CAST(_func) ((int (*)(struct bu_vls *, const struct rt_db_internal *, const char *))((void (*)(void))_func))
215
216 int (*ft_adjust)(struct bu_vls *, struct rt_db_internal *, int /*argc*/, const char ** /*argv*/);
217#define RTFUNCTAB_FUNC_ADJUST_CAST(_func) ((int (*)(struct bu_vls *, struct rt_db_internal *, int, const char **))((void (*)(void))_func))
218
219 int (*ft_form)(struct bu_vls *, const struct rt_functab *);
220#define RTFUNCTAB_FUNC_FORM_CAST(_func) ((int (*)(struct bu_vls *, const struct rt_functab *))((void (*)(void))_func))
221
222 void (*ft_make)(const struct rt_functab *, struct rt_db_internal * /*ip*/);
223#define RTFUNCTAB_FUNC_MAKE_CAST(_func) ((void (*)(const struct rt_functab *, struct rt_db_internal *))((void (*)(void))_func))
224
225 int (*ft_params)(struct pc_pc_set *, const struct rt_db_internal * /*ip*/);
226#define RTFUNCTAB_FUNC_PARAMS_CAST(_func) ((int (*)(struct pc_pc_set *, const struct rt_db_internal *))((void (*)(void))_func))
227
228 /* Axis aligned bounding box */
229 int (*ft_bbox)(struct rt_db_internal * /*ip*/,
230 point_t * /*min X, Y, Z of bounding RPP*/,
231 point_t * /*max X, Y, Z of bounding RPP*/,
232 const struct bn_tol *);
233#define RTFUNCTAB_FUNC_BBOX_CAST(_func) ((int (*)(struct rt_db_internal *, point_t *, point_t *, const struct bn_tol *))((void (*)(void))_func))
234
235 void (*ft_volume)(fastf_t * /*vol*/, const struct rt_db_internal * /*ip*/);
236#define RTFUNCTAB_FUNC_VOLUME_CAST(_func) ((void (*)(fastf_t *, const struct rt_db_internal *))((void (*)(void))_func))
237
238 void (*ft_surf_area)(fastf_t * /*area*/, const struct rt_db_internal * /*ip*/);
239#define RTFUNCTAB_FUNC_SURF_AREA_CAST(_func) ((void (*)(fastf_t *, const struct rt_db_internal *))((void (*)(void))_func))
240
241 void (*ft_centroid)(point_t * /*cent*/, const struct rt_db_internal * /*ip*/);
242#define RTFUNCTAB_FUNC_CENTROID_CAST(_func) ((void (*)(point_t *, const struct rt_db_internal *))((void (*)(void))_func))
243
244 int (*ft_oriented_bbox)(struct rt_arb_internal * /* bounding arb8 */,
245 struct rt_db_internal * /*ip*/,
246 const fastf_t);
247#define RTFUNCTAB_FUNC_ORIENTED_BBOX_CAST(_func) ((int (*)(struct rt_arb_internal *, struct rt_db_internal *, const fastf_t))((void (*)(void))_func))
248
249 /** get a list of the selections matching a query */
250 struct rt_selection_set *(*ft_find_selections)(const struct rt_db_internal *,
251 const struct rt_selection_query *);
252#define RTFUNCTAB_FUNC_FIND_SELECTIONS_CAST(_func) ((struct rt_selection_set *(*)(const struct rt_db_internal *, const struct rt_selection_query *))((void (*)(void))_func))
253
254 /**
255 * evaluate a logical selection expression (e.g. a INTERSECT b,
256 * NOT a) to create a new selection
257 */
258 struct rt_selection *(*ft_evaluate_selection)(const struct rt_db_internal *,
259 int op,
260 const struct rt_selection *,
261 const struct rt_selection *);
262#define RTFUNCTAB_FUNC_EVALUATE_SELECTION_CAST(_func) ((struct rt_selection *(*)(const struct rt_db_internal *, int op, const struct rt_selection *, const struct rt_selection *))((void (*)(void))_func))
263
264 /** apply an operation to a selected subset of a primitive */
266 struct db_i *,
267 const struct rt_selection *,
268 const struct rt_selection_operation *);
269#define RTFUNCTAB_FUNC_PROCESS_SELECTION_CAST(_func) ((int (*)(struct rt_db_internal *, struct db_i *, const struct rt_selection *, const struct rt_selection_operation *))((void (*)(void))_func))
270
271 /** cache and uncache prep data for faster future lookup */
272 int (*ft_prep_serialize)(struct soltab *stp, const struct rt_db_internal *ip, struct bu_external *external, size_t *version);
273#define RTFUNCTAB_FUNC_PREP_SERIALIZE_CAST(_func) ((int (*)(struct soltab *, const struct rt_db_internal *, struct bu_external *, size_t *))((void (*)(void))_func))
274
275 /** generate labels for the primitive. Returns the number of labels populated in pl */
276 int (*ft_labels)(struct rt_point_labels *pl, int pl_max, const mat_t xform, const struct rt_db_internal *ip, const struct bn_tol *tol);
277#define RTFUNCTAB_FUNC_LABELS_CAST(_func) ((int (*)(struct rt_point_labels *, int, const mat_t, const struct rt_db_internal *, const struct bn_tol *))((void (*)(void))_func))
278
279 /** Return keypoint information. If keystr is non-NULL, that string will
280 * be used as a lookup - otherwise, a primitive-defined default will be
281 * used. If the internal default was used for the lookup a pointer to a
282 * static copy of the default keystr is returned. Otherwise, if the
283 * keypoint lookup was successful, keystr is returned. If NULL is returned,
284 * no keypoint was determined.
285 *
286 * TODO - The format of keystr may be specific to individual primitives.
287 * In principle something complex like "F10E2V1" (for example) might be
288 * desirable to select a particular brep face/edge/vertex - right now the
289 * valid inputs aren't yet documented. */
290 const char *(*ft_keypoint)(point_t *pt, const char *keystr, const mat_t mat, const struct rt_db_internal *ip, const struct bn_tol *tol);
291#define RTFUNCTAB_FUNC_KEYPOINT_CAST(_func) ((const char *(*)(point_t *, const char *, const mat_t, const struct rt_db_internal *, const struct bn_tol *))((void (*)(void))_func))
293 /* Apply matrix to primitive parameters */
294 int (*ft_mat)(struct rt_db_internal *, const mat_t, const struct rt_db_internal *);
295#define RTFUNCTAB_FUNC_MAT_CAST(_func) ((int (*)(struct rt_db_internal *, const mat_t, const struct rt_db_internal *))((void (*)(void))_func))
297 /** perturb geometry parameters of primitive. NOTE: the oip primitive
298 * returned is NOT guaranteed to be the same type as that of ip - for example,
299 * ARB8 perturbations will return an ARBN primitive. */
300 int (*ft_perturb)(struct rt_db_internal **oip, const struct rt_db_internal *ip, int planar_only, fastf_t factor);
301#define RTFUNCTAB_FUNC_PERTURB_CAST(_func) ((int (*)(struct rt_db_internal **, const struct rt_db_internal *, int, fastf_t))((void (*)(void))_func))
303 /* Populate a scene object with the appropriate visualization data. Unlike
304 * ft_plot, this routine handles multiple drawing modes (e.g. shaded) and
305 * adaptive plotting based on a view. If NULL parameters are passed for
306 * tolerance, defaults will be used. If no view info is available, adaptive
307 * settings are ignored and the standard visuals will be generated.
308 *
309 * Unlike most functab methods, we deliberately use a directory pointer and
310 * the database instance pointer as inputs rather than the rt_db_internal.
311 * This is for performance reasons - some primitives cache drawing data
312 * in a way that lets them draw more quickly than they could trying to process
313 * the full rt_db_internal primitive data, and in those cases we want to avoid
314 * the memory overhead of populating an rt_db_internal unless it is actually
315 * needed.
316 *
317 * TODO - for combs, we either need the evaluated tree output or an agglomeration
318 * of all the leaf wireframes. Normally the latter won't be what apps want,
319 * since it wouldn't reuse solid leaf wireframes, but from an API perspective
320 * it's what this function would return... */
321 int (*ft_scene_obj)(struct bv_scene_obj * /*s*/,
322 struct directory * /*dp*/,
323 struct db_i * /*dbip*/,
324 const struct bg_tess_tol * /*ttol*/,
325 const struct bn_tol * /*tol*/,
326 const struct bview * /*v*/);
327#define RTFUNCTAB_FUNC_SCENE_OBJ_CAST(_func) ((int (*)(struct bv_scene_obj *, struct directory *, struct db_i *, const struct bg_tess_tol *, const struct bn_tol *, const struct bview *))((void (*)(void))_func))
328
330
331/**
332 * Function table defining per-primitive methods for plotting, tessellation,
333 * etc. In essence this is a way to do "object oriented" coding strictly
334 * in C. */
335RT_EXPORT extern const struct rt_functab OBJ[];
336
337#define RT_CK_FUNCTAB(_p) BU_CKMAG(_p, RT_FUNCTAB_MAGIC, "functab");
338
339RT_EXPORT extern const struct rt_functab *rt_get_functab_by_label(const char *label);
340
342
343////////////////////////////////////////////////////////////////////////////////////
344/* Second table specific to editing functionality. Eventually this may simply fold
345 * into the main librt table, but currently (in 2025) we're in early testing so
346 * keeping things separate for now. */
347struct rt_edit_functab {
349 char ft_name[17]; /* current longest name is 16 chars, need one element for terminating NULL */
350 char ft_label[9]; /* current longest label is 8 chars, need one element for terminating NULL */
353 point_t *lines,
355 int max_pl,
356 const mat_t xform,
357 struct rt_edit *s,
358 struct bn_tol *tol);
359#define EDFUNCTAB_FUNC_LABELS_CAST(_func) ((void (*)(int *, point_t *, struct rt_point_labels *, int, const mat_t, struct rt_edit *, struct bn_tol *))((void (*)(void))_func))
360
361 const char *(*ft_keypoint)(point_t *pt,
362 const char *keystr,
363 const mat_t mat,
364 struct rt_edit *s,
365 const struct bn_tol *tol);
366#define EDFUNCTAB_FUNC_KEYPOINT_CAST(_func) ((const char *(*)(point_t *, const char *, const mat_t, struct rt_edit *, const struct bn_tol *))((void (*)(void))_func))
367
369 struct rt_edit *s,
370 const struct rt_db_internal *ip,
371 const struct bn_tol *tol);
372#define EDFUNCTAB_FUNC_E_AXES_POS_CAST(_func) ((void(*)(struct rt_edit *s, const struct rt_db_internal *, const struct bn_tol *))((void (*)(void))_func))
373
374 // Written format is intended to be human editable text that will be parsed
375 // by ft_read_params. There are no guarantees of formatting consistency by
376 // this API, so external apps should not rely on this format being
377 // consistent release-to-release. The only API guarantee is that
378 // ft_write_params output for a given BRL-CAD version is readable by
379 // ft_read_params.
381 struct bu_vls *p,
382 const struct rt_db_internal *ip,
383 const struct bn_tol *tol,
384 fastf_t base2local);
385#define EDFUNCTAB_FUNC_WRITE_PARAMS_CAST(_func) ((void(*)(struct bu_vls *, const struct rt_db_internal *, const struct bn_tol *, fastf_t))((void (*)(void))_func))
386
387 // Parse ft_write_params output and assign numerical values to ip.
388 int(*ft_read_params)(
389 struct rt_db_internal *ip,
390 const char *fc,
391 const struct bn_tol *tol,
392 fastf_t local2base);
393#define EDFUNCTAB_FUNC_READ_PARAMS_CAST(_func) ((int(*)(struct rt_db_internal *, const char *, const struct bn_tol *, fastf_t))((void (*)(void))_func))
394
395 int(*ft_edit)(struct rt_edit *s);
396#define EDFUNCTAB_FUNC_EDIT_CAST(_func) ((int(*)(struct rt_edit *))((void (*)(void))_func))
398 /* Translate mouse info into edit ready info. mousevec [X] and [Y] are in
399 * the range -1.0...+1.0, corresponding to viewspace.
400 *
401 * In order to allow command line commands to do the same things that a
402 * mouse movements can, the preferred strategy is to store values and allow
403 * ft_edit to actually do the work. */
404 int(*ft_edit_xy)(struct rt_edit *s, const vect_t mousevec);
405#define EDFUNCTAB_FUNC_EDITXY_CAST(_func) ((int(*)(struct rt_edit *, const vect_t))((void (*)(void))_func))
407 /* Create primitive specific editing struct */
408 void *(*ft_prim_edit_create)(struct rt_edit *s);
409#define EDFUNCTAB_FUNC_PRIMEDIT_CREATE_CAST(_func) ((void *(*)(struct rt_edit *))((void (*)(void))_func))
411 /* Destroy primitive specific editing struct */
412 void (*ft_prim_edit_destroy)(void *);
413#define EDFUNCTAB_FUNC_PRIMEDIT_DESTROY_CAST(_func) ((void(*)(void *))((void (*)(void))_func))
415 /* Create primitive specific editing struct */
416 void (*ft_prim_edit_reset)(struct rt_edit *s);
417#define EDFUNCTAB_FUNC_PRIMEDIT_RESET_CAST(_func) ((void(*)(struct rt_edit *))((void (*)(void))_func))
419 int (*ft_menu_str)(struct bu_vls *m, const struct rt_db_internal *ip, const struct bn_tol *tol);
420#define EDFUNCTAB_FUNC_MENU_STR_CAST(_func) ((int(*)(struct bu_vls *, const struct rt_db_internal *, const struct bn_tol *))((void (*)(void))_func))
422 /* Set up a particular solid editing mode. Does any internal setup needed
423 * to prepare for the specified editing operation. */
424 void (*ft_set_edit_mode)(struct rt_edit *s, int mode);
425#define EDFUNCTAB_FUNC_SET_EDIT_MODE_CAST(_func) ((void(*)(struct rt_edit *, int))((void (*)(void))_func))
427 struct rt_edit_menu_item *(*ft_menu_item)(const struct bn_tol *tol);
428#define EDFUNCTAB_FUNC_MENU_ITEM_CAST(_func) ((struct rt_edit_menu_item *(*)(const struct bn_tol *))((void (*)(void))_func))
429
431
432RT_EXPORT extern const struct rt_edit_functab EDOBJ[];
433
434
436
437#endif /* RT_FUNCTAB_H */
438/** @} */
439/*
440 * Local Variables:
441 * tab-width: 8
442 * mode: C
443 * indent-tabs-mode: t
444 * c-file-style: "stroustrup"
445 * End:
446 * ex: shiftwidth=4 tabstop=8
447 */
Definition dvec.h:74
Header file for the BRL-CAD common definitions.
void int char * mode
Definition tig.h:179
const struct rt_edit_functab EDOBJ[]
const struct rt_functab * rt_get_functab_by_label(const char *label)
const struct rt_functab OBJ[]
fastf_t vect_t[ELEMENTS_PER_VECT]
3-tuple vector
Definition vmath.h:349
double fastf_t
fastest 64-bit (or larger) floating point type
Definition vmath.h:334
fastf_t mat_t[ELEMENTS_PER_MAT]
4x4 matrix
Definition vmath.h:370
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition vmath.h:355
Definition tol.h:72
Definition vls.h:53
Information about where a ray hits the surface.
Definition hit.h:61
NMG topological model.
Definition topology.h:289
NMG topological region.
Definition topology.h:277
void(* ft_set_edit_mode)(struct rt_edit *s, int mode)
Definition functab.h:426
void(* ft_labels)(int *num_lines, point_t *lines, struct rt_point_labels *pl, int max_pl, const mat_t xform, struct rt_edit *s, struct bn_tol *tol)
Definition functab.h:354
int(* ft_menu_str)(struct bu_vls *m, const struct rt_db_internal *ip, const struct bn_tol *tol)
Definition functab.h:421
int(* ft_edit_xy)(struct rt_edit *s, const vect_t mousevec)
Definition functab.h:406
uint32_t magic
Definition functab.h:350
void(* ft_prim_edit_reset)(struct rt_edit *s)
Definition functab.h:418
int(* ft_read_params)(struct rt_db_internal *ip, const char *fc, const struct bn_tol *tol, fastf_t local2base)
Definition functab.h:390
void(* ft_e_axes_pos)(struct rt_edit *s, const struct rt_db_internal *ip, const struct bn_tol *tol)
Definition functab.h:370
void(* ft_prim_edit_destroy)(void *)
Definition functab.h:414
void(* ft_write_params)(struct bu_vls *p, const struct rt_db_internal *ip, const struct bn_tol *tol, fastf_t base2local)
Definition functab.h:382
char ft_name[17]
Definition functab.h:351
int(* ft_edit)(struct rt_edit *s)
Definition functab.h:397
char ft_label[9]
Definition functab.h:352
uint32_t ft_internal_magic
RT_XXX_INTERNAL_MAGIC.
Definition functab.h:211
void(* ft_make)(const struct rt_functab *, struct rt_db_internal *)
Definition functab.h:222
size_t ft_internal_size
sizeof(struct rt_xxx_internal)
Definition functab.h:210
int(* ft_get)(struct bu_vls *, const struct rt_db_internal *, const char *item)
Definition functab.h:213
int(* ft_plot)(struct bu_list *, struct rt_db_internal *, const struct bg_tess_tol *, const struct bn_tol *, const struct bview *)
Definition functab.h:129
int(* ft_mat)(struct rt_db_internal *, const mat_t, const struct rt_db_internal *)
Definition functab.h:295
void(* ft_surf_area)(fastf_t *, const struct rt_db_internal *)
Definition functab.h:238
int(* ft_import5)(struct rt_db_internal *, const struct bu_external *, const mat_t, const struct db_i *, struct resource *)
Definition functab.h:167
int(* ft_xform)(struct rt_db_internal *, const mat_t, struct rt_db_internal *, int, struct db_i *)
Definition functab.h:204
int(* ft_params)(struct pc_pc_set *, const struct rt_db_internal *)
Definition functab.h:225
int(* ft_export5)(struct bu_external *, const struct rt_db_internal *, double, const struct db_i *, struct resource *)
Definition functab.h:174
int(* ft_export4)(struct bu_external *, const struct rt_db_internal *, double, const struct db_i *, struct resource *)
Definition functab.h:188
const struct bu_structparse * ft_parsetab
rt_xxx_parse
Definition functab.h:209
uint32_t magic
Definition functab.h:74
int(* ft_shot)(struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead)
Definition functab.h:85
int(* ft_oriented_bbox)(struct rt_arb_internal *, struct rt_db_internal *, const fastf_t)
Definition functab.h:244
void(* ft_curve)(struct curvature *cvp, struct hit *hitp, struct soltab *stp)
Definition functab.h:118
void(* ft_brep)(ON_Brep **, struct rt_db_internal *, const struct bn_tol *)
Definition functab.h:162
int(* ft_prep)(struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
Definition functab.h:80
int(* ft_form)(struct bu_vls *, const struct rt_functab *)
Definition functab.h:219
void(* ft_piece_hitsegs)(struct rt_piecestate *psp, struct seg *seghead, struct application *ap)
Definition functab.h:107
int(* ft_bbox)(struct rt_db_internal *, point_t *, point_t *, const struct bn_tol *)
Definition functab.h:229
int ft_use_rpp
Definition functab.h:78
int(* ft_adaptive_plot)(struct bu_list *, struct rt_db_internal *, const struct bn_tol *, const struct bview *, fastf_t)
Definition functab.h:136
void(* ft_centroid)(point_t *, const struct rt_db_internal *)
Definition functab.h:241
void(* ft_norm)(struct hit *hitp, struct soltab *stp, struct xray *rp)
Definition functab.h:94
void(* ft_free)(struct soltab *)
Definition functab.h:126
int(* ft_scene_obj)(struct bv_scene_obj *, struct directory *, struct db_i *, const struct bg_tess_tol *, const struct bn_tol *, const struct bview *)
Definition functab.h:323
void(* ft_volume)(fastf_t *, const struct rt_db_internal *)
Definition functab.h:235
int(* ft_classify)(const struct soltab *, const vect_t, const vect_t, const struct bn_tol *)
Definition functab.h:123
int(* ft_process_selection)(struct rt_db_internal *, struct db_i *, const struct rt_selection *, const struct rt_selection_operation *)
Definition functab.h:265
int(* ft_import4)(struct rt_db_internal *, const struct bu_external *, const mat_t, const struct db_i *, struct resource *)
Definition functab.h:181
void(* ft_vshot)(struct soltab *[], struct xray *[], struct seg *, int, struct application *)
Definition functab.h:143
int(* ft_tessellate)(struct nmgregion **, struct model *, struct rt_db_internal *, const struct bg_tess_tol *, const struct bn_tol *)
Definition functab.h:150
void(* ft_ifree)(struct rt_db_internal *)
Definition functab.h:195
char ft_name[17]
Definition functab.h:75
int(* ft_piece_shot)(struct rt_piecestate *psp, struct rt_piecelist *plp, double dist, struct xray *ray, struct application *ap, struct seg *seghead)
Definition functab.h:99
int(* ft_describe)(struct bu_vls *, const struct rt_db_internal *, int, double)
Definition functab.h:198
int(* ft_labels)(struct rt_point_labels *pl, int pl_max, const mat_t xform, const struct rt_db_internal *ip, const struct bn_tol *tol)
Definition functab.h:276
int(* ft_adjust)(struct bu_vls *, struct rt_db_internal *, int, const char **)
Definition functab.h:216
void(* ft_print)(const struct soltab *stp)
Definition functab.h:91
int(* ft_tnurb)(struct nmgregion **, struct model *, struct rt_db_internal *, const struct bn_tol *)
Definition functab.h:156
int(* ft_perturb)(struct rt_db_internal **oip, const struct rt_db_internal *ip, int planar_only, fastf_t factor)
Definition functab.h:301
int(* ft_prep_serialize)(struct soltab *stp, const struct rt_db_internal *ip, struct bu_external *external, size_t *version)
Definition functab.h:272
void(* ft_uv)(struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp)
Definition functab.h:112
char ft_label[9]
Definition functab.h:76
Definition seg.h:59
Definition hit.h:152
Primary ray data structure.
Definition xray.h:41
fundamental vector, matrix, quaternion math macros