BRL-CAD
labels.c
Go to the documentation of this file.
1 /* L A B E L S . C
2  * BRL-CAD
3  *
4  * Copyright (c) 1998-2014 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 #include "common.h"
22 
23 #include <math.h>
24 
25 #include "vmath.h"
26 #include "bn.h"
27 #include "db.h"
28 #include "mater.h"
29 #include "nmg.h"
30 #include "rtgeom.h"
31 #include "nurb.h"
32 #include "solid.h"
33 #include "dm.h"
34 #include "dm_private.h"
35 
36 /*
37  * Put labels on the vertices of the currently edited solid.
38  * XXX This really should use import/export interface!!! Or be part of it.
39  *
40  * This code was lifted from mged/edsol.c.
41  * XXX This should probably live in librt.
42  */
43 void
45  struct rt_point_labels pl[],
46  int max_pl,
47  const mat_t xform,
48  struct rt_db_internal *ip)
49 {
50  int i;
51  point_t work;
52  point_t pos_view;
53  int npl = 0;
54 
55 
56 #define POINT_LABEL(_pt, _char) { \
57  if (npl+1 < max_pl) { \
58  VMOVE(pl[npl].pt, _pt); \
59  pl[npl].str[0] = _char; \
60  pl[npl++].str[1] = '\0'; \
61  } \
62  }
63 
64 #define POINT_LABEL_STR(_pt, _str) { \
65  VMOVE(pl[npl].pt, _pt); \
66  bu_strlcpy(pl[npl++].str, _str, sizeof(pl[0].str)); }
67 
68 
70 
71  if (ip->idb_major_type != DB5_MAJORTYPE_BRLCAD)
72  /* silently ignore */
73  return;
74 
75  switch (ip->idb_minor_type) {
76  case DB5_MINORTYPE_BRLCAD_TOR: {
77  struct rt_tor_internal *tor =
78  (struct rt_tor_internal *)ip->idb_ptr;
79  fastf_t r3, r4;
80  vect_t adir;
81 
82  RT_TOR_CK_MAGIC(tor);
83 
84  bn_vec_ortho(adir, tor->h);
85 
86  MAT4X3PNT(pos_view, xform, tor->v);
87  POINT_LABEL(pos_view, 'V');
88 
89  r3 = tor->r_a - tor->r_h;
90  VJOIN1(work, tor->v, r3, adir);
91  MAT4X3PNT(pos_view, xform, work);
92  POINT_LABEL(pos_view, 'I');
93 
94  r4 = tor->r_a + tor->r_h;
95  VJOIN1(work, tor->v, r4, adir);
96  MAT4X3PNT(pos_view, xform, work);
97  POINT_LABEL(pos_view, 'O');
98 
99  VJOIN1(work, tor->v, tor->r_a, adir);
100  VADD2(work, work, tor->h);
101  MAT4X3PNT(pos_view, xform, work);
102  POINT_LABEL(pos_view, 'H');
103  }
104 
105  break;
106  case DB5_MINORTYPE_BRLCAD_TGC: {
107  struct rt_tgc_internal *tgc =
108  (struct rt_tgc_internal *)ip->idb_ptr;
109 
110  RT_TGC_CK_MAGIC(tgc);
111  MAT4X3PNT(pos_view, xform, tgc->v);
112  POINT_LABEL(pos_view, 'V');
113 
114  VADD2(work, tgc->v, tgc->a);
115  MAT4X3PNT(pos_view, xform, work);
116  POINT_LABEL(pos_view, 'A');
117 
118  VADD2(work, tgc->v, tgc->b);
119  MAT4X3PNT(pos_view, xform, work);
120  POINT_LABEL(pos_view, 'B');
121 
122  VADD3(work, tgc->v, tgc->h, tgc->c);
123  MAT4X3PNT(pos_view, xform, work);
124  POINT_LABEL(pos_view, 'C');
125 
126  VADD3(work, tgc->v, tgc->h, tgc->d);
127  MAT4X3PNT(pos_view, xform, work);
128  POINT_LABEL(pos_view, 'D');
129  }
130 
131  break;
132  case DB5_MINORTYPE_BRLCAD_SPH:
133  case DB5_MINORTYPE_BRLCAD_ELL: {
134  struct rt_ell_internal *ell =
135  (struct rt_ell_internal *)ip->idb_ptr;
136 
137  RT_ELL_CK_MAGIC(ell);
138 
139  MAT4X3PNT(pos_view, xform, ell->v);
140  POINT_LABEL(pos_view, 'V');
141 
142  VADD2(work, ell->v, ell->a);
143  MAT4X3PNT(pos_view, xform, work);
144  POINT_LABEL(pos_view, 'A');
145 
146  VADD2(work, ell->v, ell->b);
147  MAT4X3PNT(pos_view, xform, work);
148  POINT_LABEL(pos_view, 'B');
149 
150  VADD2(work, ell->v, ell->c);
151  MAT4X3PNT(pos_view, xform, work);
152  POINT_LABEL(pos_view, 'C');
153  }
154 
155  break;
156  case DB5_MINORTYPE_BRLCAD_ARB8: {
157  int arbType;
158  struct rt_arb_internal *arb=
159  (struct rt_arb_internal *)ip->idb_ptr;
160 
161  RT_ARB_CK_MAGIC(arb);
162  arbType = rt_arb_std_type(ip, &wdbp->wdb_tol);
163 
164  switch (arbType) {
165  case ARB8:
166  for (i=0; i<8; i++) {
167  MAT4X3PNT(pos_view, xform, arb->pt[i]);
168  POINT_LABEL(pos_view, (unsigned char)i+'1');
169  }
170 
171  break;
172  case ARB7:
173  for (i=0; i<7; i++) {
174  MAT4X3PNT(pos_view, xform, arb->pt[i]);
175  POINT_LABEL(pos_view, (unsigned char)i+'1');
176  }
177 
178  break;
179  case ARB6:
180  for (i=0; i<5; i++) {
181  MAT4X3PNT(pos_view, xform, arb->pt[i]);
182  POINT_LABEL(pos_view, (unsigned char)i+'1');
183  }
184  MAT4X3PNT(pos_view, xform, arb->pt[6]);
185  POINT_LABEL(pos_view, '6');
186 
187  break;
188  case ARB5:
189  for (i=0; i<5; i++) {
190  MAT4X3PNT(pos_view, xform, arb->pt[i]);
191  POINT_LABEL(pos_view, (unsigned char)i+'1');
192  }
193 
194  break;
195  case ARB4:
196  for (i=0; i<3; i++) {
197  MAT4X3PNT(pos_view, xform, arb->pt[i]);
198  POINT_LABEL(pos_view, (unsigned char)i+'1');
199  }
200  MAT4X3PNT(pos_view, xform, arb->pt[4]);
201  POINT_LABEL(pos_view, '4');
202 
203  break;
204  }
205  }
206 
207  break;
208  case DB5_MINORTYPE_BRLCAD_ARS: {
209  /*XXX Needs work */
210  struct rt_ars_internal *ars=
211  (struct rt_ars_internal *)ip->idb_ptr;
212  int ars_crv = 0;
213  int ars_col = 0;
214 
215  RT_ARS_CK_MAGIC(ars);
216 
217  MAT4X3PNT(pos_view, xform, ars->curves[0]);
218 
219  if (ars_crv >= 0 && ars_col >= 0) {
220  point_t ars_pt;
221 
222  VMOVE(work, &ars->curves[ars_crv][ars_col*3]);
223  MAT4X3PNT(ars_pt, xform, work);
224  POINT_LABEL_STR(ars_pt, "pt");
225  }
226  }
227  POINT_LABEL(pos_view, 'V');
228 
229  break;
230  case DB5_MINORTYPE_BRLCAD_HALF:
231  break;
232  case DB5_MINORTYPE_BRLCAD_REC:
233  break;
234  case DB5_MINORTYPE_BRLCAD_POLY:
235  break;
236  case DB5_MINORTYPE_BRLCAD_BSPLINE: {
237  /*XXX Needs work */
238  struct rt_nurb_internal *sip =
239  (struct rt_nurb_internal *) ip->idb_ptr;
240  struct face_g_snurb *surf;
241  fastf_t *fp;
242  int spl_surfno = 0;
243  int spl_ui = 0;
244  int spl_vi = 0;
245 
246  RT_NURB_CK_MAGIC(sip);
247  surf = sip->srfs[spl_surfno];
248  NMG_CK_SNURB(surf);
249  fp = &RT_NURB_GET_CONTROL_POINT(surf, spl_ui, spl_vi);
250  MAT4X3PNT(pos_view, xform, fp);
251  POINT_LABEL(pos_view, 'V');
252 
253  fp = &RT_NURB_GET_CONTROL_POINT(surf, 0, 0);
254  MAT4X3PNT(pos_view, xform, fp);
255  POINT_LABEL_STR(pos_view, " 0, 0");
256  fp = &RT_NURB_GET_CONTROL_POINT(surf, 0, surf->s_size[1]-1);
257  MAT4X3PNT(pos_view, xform, fp);
258  POINT_LABEL_STR(pos_view, " 0, u");
259  fp = &RT_NURB_GET_CONTROL_POINT(surf, surf->s_size[0]-1, 0);
260  MAT4X3PNT(pos_view, xform, fp);
261  POINT_LABEL_STR(pos_view, " v, 0");
262  fp = &RT_NURB_GET_CONTROL_POINT(surf, surf->s_size[0]-1, surf->s_size[1]-1);
263  MAT4X3PNT(pos_view, xform, fp);
264  POINT_LABEL_STR(pos_view, " u, v");
265  }
266 
267  break;
268  case DB5_MINORTYPE_BRLCAD_NMG:
269  break;
270  case DB5_MINORTYPE_BRLCAD_EBM:
271  break;
272  case DB5_MINORTYPE_BRLCAD_VOL:
273  break;
274  case DB5_MINORTYPE_BRLCAD_ARBN:
275  break;
276  case DB5_MINORTYPE_BRLCAD_PIPE:
277  break;
278  case DB5_MINORTYPE_BRLCAD_PARTICLE: {
279  struct rt_part_internal *part =
280  (struct rt_part_internal *)ip->idb_ptr;
281  vect_t Ru, ortho;
282 
283  RT_PART_CK_MAGIC(part);
284 
285  MAT4X3PNT(pos_view, xform, part->part_V);
286  POINT_LABEL(pos_view, 'V');
287 
288  VADD2(work, part->part_V, part->part_H);
289  MAT4X3PNT(pos_view, xform, work);
290  POINT_LABEL(pos_view, 'H');
291 
292  VMOVE(Ru, part->part_H);
293  VUNITIZE(Ru);
294  bn_vec_ortho(ortho, Ru);
295  VSCALE(work, ortho, part->part_vrad);
296  VADD2(work, part->part_V, work);
297  MAT4X3PNT(pos_view, xform, work);
298  POINT_LABEL(pos_view, 'v');
299 
300  VSCALE(work, ortho, part->part_hrad);
301  VADD3(work, part->part_V, part->part_H, work);
302  MAT4X3PNT(pos_view, xform, work);
303  POINT_LABEL(pos_view, 'h');
304  }
305 
306  break;
307  case DB5_MINORTYPE_BRLCAD_RPC: {
308  struct rt_rpc_internal *rpc =
309  (struct rt_rpc_internal *)ip->idb_ptr;
310  vect_t Ru;
311 
312  RT_RPC_CK_MAGIC(rpc);
313 
314  MAT4X3PNT(pos_view, xform, rpc->rpc_V);
315  POINT_LABEL(pos_view, 'V');
316 
317  VADD2(work, rpc->rpc_V, rpc->rpc_B);
318  MAT4X3PNT(pos_view, xform, work);
319  POINT_LABEL(pos_view, 'B');
320 
321  VADD2(work, rpc->rpc_V, rpc->rpc_H);
322  MAT4X3PNT(pos_view, xform, work);
323  POINT_LABEL(pos_view, 'H');
324 
325  VCROSS(Ru, rpc->rpc_B, rpc->rpc_H);
326  VUNITIZE(Ru);
327  VSCALE(Ru, Ru, rpc->rpc_r);
328  VADD2(work, rpc->rpc_V, Ru);
329  MAT4X3PNT(pos_view, xform, work);
330  POINT_LABEL(pos_view, 'r');
331  }
332 
333  break;
334  case DB5_MINORTYPE_BRLCAD_RHC: {
335  struct rt_rhc_internal *rhc =
336  (struct rt_rhc_internal *)ip->idb_ptr;
337  vect_t Ru;
338 
339  RT_RHC_CK_MAGIC(rhc);
340 
341  MAT4X3PNT(pos_view, xform, rhc->rhc_V);
342  POINT_LABEL(pos_view, 'V');
343 
344  VADD2(work, rhc->rhc_V, rhc->rhc_B);
345  MAT4X3PNT(pos_view, xform, work);
346  POINT_LABEL(pos_view, 'B');
347 
348  VADD2(work, rhc->rhc_V, rhc->rhc_H);
349  MAT4X3PNT(pos_view, xform, work);
350  POINT_LABEL(pos_view, 'H');
351 
352  VCROSS(Ru, rhc->rhc_B, rhc->rhc_H);
353  VUNITIZE(Ru);
354  VSCALE(Ru, Ru, rhc->rhc_r);
355  VADD2(work, rhc->rhc_V, Ru);
356  MAT4X3PNT(pos_view, xform, work);
357  POINT_LABEL(pos_view, 'r');
358 
359  VMOVE(work, rhc->rhc_B);
360  VUNITIZE(work);
361  VSCALE(work, work,
362  MAGNITUDE(rhc->rhc_B) + rhc->rhc_c);
363  VADD2(work, work, rhc->rhc_V);
364  MAT4X3PNT(pos_view, xform, work);
365  POINT_LABEL(pos_view, 'c');
366  }
367 
368  break;
369  case DB5_MINORTYPE_BRLCAD_EPA: {
370  struct rt_epa_internal *epa =
371  (struct rt_epa_internal *)ip->idb_ptr;
372  vect_t A, B;
373 
374  RT_EPA_CK_MAGIC(epa);
375 
376  MAT4X3PNT(pos_view, xform, epa->epa_V);
377  POINT_LABEL(pos_view, 'V');
378 
379  VADD2(work, epa->epa_V, epa->epa_H);
380  MAT4X3PNT(pos_view, xform, work);
381  POINT_LABEL(pos_view, 'H');
382 
383  VSCALE(A, epa->epa_Au, epa->epa_r1);
384  VADD2(work, epa->epa_V, A);
385  MAT4X3PNT(pos_view, xform, work);
386  POINT_LABEL(pos_view, 'A');
387 
388  VCROSS(B, epa->epa_Au, epa->epa_H);
389  VUNITIZE(B);
390  VSCALE(B, B, epa->epa_r2);
391  VADD2(work, epa->epa_V, B);
392  MAT4X3PNT(pos_view, xform, work);
393  POINT_LABEL(pos_view, 'B');
394  }
395 
396  break;
397  case DB5_MINORTYPE_BRLCAD_EHY: {
398  struct rt_ehy_internal *ehy =
399  (struct rt_ehy_internal *)ip->idb_ptr;
400  vect_t A, B;
401 
402  RT_EHY_CK_MAGIC(ehy);
403 
404  MAT4X3PNT(pos_view, xform, ehy->ehy_V);
405  POINT_LABEL(pos_view, 'V');
406 
407  VADD2(work, ehy->ehy_V, ehy->ehy_H);
408  MAT4X3PNT(pos_view, xform, work);
409  POINT_LABEL(pos_view, 'H');
410 
411  VSCALE(A, ehy->ehy_Au, ehy->ehy_r1);
412  VADD2(work, ehy->ehy_V, A);
413  MAT4X3PNT(pos_view, xform, work);
414  POINT_LABEL(pos_view, 'A');
415 
416  VCROSS(B, ehy->ehy_Au, ehy->ehy_H);
417  VUNITIZE(B);
418  VSCALE(B, B, ehy->ehy_r2);
419  VADD2(work, ehy->ehy_V, B);
420  MAT4X3PNT(pos_view, xform, work);
421  POINT_LABEL(pos_view, 'B');
422 
423  VMOVE(work, ehy->ehy_H);
424  VUNITIZE(work);
425  VSCALE(work, work,
426  MAGNITUDE(ehy->ehy_H) + ehy->ehy_c);
427  VADD2(work, ehy->ehy_V, work);
428  MAT4X3PNT(pos_view, xform, work);
429  POINT_LABEL(pos_view, 'c');
430  }
431 
432  break;
433  case DB5_MINORTYPE_BRLCAD_ETO: {
434  struct rt_eto_internal *eto =
435  (struct rt_eto_internal *)ip->idb_ptr;
436  fastf_t ch, cv, dh, dv, cmag, phi;
437  vect_t Au, Nu;
438 
439  RT_ETO_CK_MAGIC(eto);
440 
441  MAT4X3PNT(pos_view, xform, eto->eto_V);
442  POINT_LABEL(pos_view, 'V');
443 
444  VMOVE(Nu, eto->eto_N);
445  VUNITIZE(Nu);
446  bn_vec_ortho(Au, Nu);
447  VUNITIZE(Au);
448 
449  cmag = MAGNITUDE(eto->eto_C);
450  /* get horizontal and vertical components of C and Rd */
451  cv = VDOT(eto->eto_C, Nu);
452  ch = sqrt(cmag*cmag - cv*cv);
453  /* angle between C and Nu */
454  phi = acos(cv / cmag);
455  dv = -eto->eto_rd * sin(phi);
456  dh = eto->eto_rd * cos(phi);
457 
458  VJOIN2(work, eto->eto_V, eto->eto_r+ch, Au, cv, Nu);
459  MAT4X3PNT(pos_view, xform, work);
460  POINT_LABEL(pos_view, 'C');
461 
462  VJOIN2(work, eto->eto_V, eto->eto_r+dh, Au, dv, Nu);
463  MAT4X3PNT(pos_view, xform, work);
464  POINT_LABEL(pos_view, 'D');
465 
466  VJOIN1(work, eto->eto_V, eto->eto_r, Au);
467  MAT4X3PNT(pos_view, xform, work);
468  POINT_LABEL(pos_view, 'r');
469  }
470 
471  break;
472  case DB5_MINORTYPE_BRLCAD_HYP: {
473  struct rt_hyp_internal *hyp =
474  (struct rt_hyp_internal *)ip->idb_ptr;
475  vect_t vB;
476 
477  RT_HYP_CK_MAGIC(hyp);
478 
479  MAT4X3PNT(pos_view, xform, hyp->hyp_Vi);
480  POINT_LABEL(pos_view, 'V');
481 
482  VADD2(work, hyp->hyp_Vi, hyp->hyp_Hi);
483  MAT4X3PNT(pos_view, xform, work);
484  POINT_LABEL(pos_view, 'H');
485 
486  VADD2(work, hyp->hyp_Vi, hyp->hyp_A);
487  MAT4X3PNT(pos_view, xform, work);
488  POINT_LABEL(pos_view, 'A');
489 
490  VCROSS(vB, hyp->hyp_A, hyp->hyp_Hi);
491  VUNITIZE(vB);
492  VSCALE(vB, vB, hyp->hyp_b);
493  VADD2(work, hyp->hyp_Vi, vB);
494  MAT4X3PNT(pos_view, xform, work);
495  POINT_LABEL(pos_view, 'B');
496  }
497 
498  break;
499  case DB5_MINORTYPE_BRLCAD_GRIP:
500  break;
501  case DB5_MINORTYPE_BRLCAD_JOINT:
502  break;
503  case DB5_MINORTYPE_BRLCAD_HF:
504  break;
505  case DB5_MINORTYPE_BRLCAD_DSP:
506  break;
507  case DB5_MINORTYPE_BRLCAD_SKETCH:
508  break;
509  case DB5_MINORTYPE_BRLCAD_EXTRUDE:
510  break;
511  case DB5_MINORTYPE_BRLCAD_SUBMODEL:
512  break;
513  case DB5_MINORTYPE_BRLCAD_CLINE: {
514  struct rt_cline_internal *cli =
515  (struct rt_cline_internal *)ip->idb_ptr;
516  point_t work1;
517 
518  RT_CLINE_CK_MAGIC(cli);
519 
520  MAT4X3PNT(pos_view, xform, cli->v);
521  POINT_LABEL(pos_view, 'V');
522 
523  VADD2(work1, cli->v, cli->h);
524  MAT4X3PNT(pos_view, xform, work1);
525  POINT_LABEL(pos_view, 'H');
526  }
527 
528  break;
529  case DB5_MINORTYPE_BRLCAD_BOT:
530  /*XXX Needs work */
531  break;
532  case DB5_MINORTYPE_BRLCAD_COMBINATION:
533  break;
534  default:
535  break;
536  }
537 
538  pl[npl].str[0] = '\0'; /* Mark ending */
539 }
540 
541 
542 int
544  struct rt_wdb *wdbp,
545  const char *name,
546  mat_t viewmat,
547  int *labelsColor,
548  int (*LabelsHook)(dm *, struct rt_wdb *, const char *, mat_t, int *, ClientData),
549  ClientData labelsHookClientdata)
550 {
551 #define MAX_PL 8+1
552  struct rt_point_labels pl[MAX_PL];
553  struct rt_db_internal intern;
554  struct directory *dp;
555  int i;
556  struct db_tree_state ts;
557  struct db_full_path path;
558 
559  if (LabelsHook != (int (*)(dm *, struct rt_wdb *, const char *, mat_t, int *, ClientData))0)
560  return LabelsHook(dmp, wdbp, name,
561  viewmat, labelsColor,
562  labelsHookClientdata);
563 
564  if (wdbp == (struct rt_wdb *)NULL ||
565  name == (char *)NULL)
566  return BRLCAD_ERROR;
567 
568  db_full_path_init(&path);
569  ts = wdbp->wdb_initial_tree_state; /* struct copy */
570  ts.ts_dbip = wdbp->dbip;
571  ts.ts_resp = &rt_uniresource;
572  MAT_IDN(ts.ts_mat);
573 
574  if (db_follow_path_for_state(&ts, &path, name, 0)) {
575  db_free_full_path(&path);
576  return BRLCAD_OK;
577  }
578 
579  dp = DB_FULL_PATH_CUR_DIR(&path);
580 
581  if (rt_db_get_internal(&intern, dp, wdbp->dbip, ts.ts_mat, &rt_uniresource) < 0) {
582  db_free_full_path(&path);
583  return BRLCAD_ERROR;
584  }
585 
586  dm_label_primitive(wdbp, pl, MAX_PL, viewmat, &intern);
587 
588  dm_set_fg(dmp,
589  (unsigned char)labelsColor[0],
590  (unsigned char)labelsColor[1],
591  (unsigned char)labelsColor[2],
592  1, 1.0);
593 
594  for (i=0; i<MAX_PL; i++) {
595  if (pl[i].str[0] == '\0')
596  break;
597 
598  dm_draw_string_2d(dmp, pl[i].str,
599  (((int)(pl[i].pt[X]*GED_MAX))+15)*INV_GED,
600  (((int)(pl[i].pt[Y]*GED_MAX))+15)*INV_GED, 0, 1);
601  }
602 
603  db_free_full_path(&path);
604  rt_db_free_internal(&intern);
605 
606  return BRLCAD_OK;
607 }
608 
609 
610 /*
611  * Local Variables:
612  * mode: C
613  * tab-width: 8
614  * indent-tabs-mode: t
615  * c-file-style: "stroustrup"
616  * End:
617  * ex: shiftwidth=4 tabstop=8
618  */
#define POINT_LABEL(_pt, _char)
#define GED_MAX
Definition: ged.h:253
int rt_db_get_internal(struct rt_db_internal *ip, const struct directory *dp, const struct db_i *dbip, const mat_t mat, struct resource *resp)
Definition: dir.c:76
int dm_draw_labels(dm *dmp, struct rt_wdb *wdbp, const char *name, mat_t viewmat, int *labelsColor, int(*LabelsHook)(dm *, struct rt_wdb *, const char *, mat_t, int *, ClientData), ClientData labelsHookClientdata)
Definition: labels.c:543
struct db_i * dbip
Definition: raytrace.h:1266
Definition: clone.c:90
#define POINT_LABEL_STR(_pt, _str)
int dm_draw_string_2d(dm *dmp, const char *str, fastf_t x, fastf_t y, int size, int use_aspect)
Definition: dm-generic.c:735
Header file for the BRL-CAD common definitions.
#define DB_FULL_PATH_CUR_DIR(_pp)
Definition: db_fullpath.h:51
void db_full_path_init(struct db_full_path *pathp)
Definition: db_fullpath.c:40
#define MAX_PL
int idb_major_type
Definition: raytrace.h:192
Definition: color.c:49
struct resource rt_uniresource
default. Defined in librt/globals.c
Definition: globals.c:41
#define RT_CK_DB_INTERNAL(_p)
Definition: raytrace.h:207
struct db_i * ts_dbip
Definition: raytrace.h:1040
void db_free_full_path(struct db_full_path *pp)
Definition: db_fullpath.c:473
void dm_label_primitive(struct rt_wdb *wdbp, struct rt_point_labels pl[], int max_pl, const mat_t xform, struct rt_db_internal *ip)
Definition: labels.c:44
#define BRLCAD_OK
Definition: defines.h:71
mat_t ts_mat
transform matrix
Definition: raytrace.h:1050
int dm_set_fg(dm *dmp, unsigned char r, unsigned char g, unsigned char b, int strict, fastf_t transparency)
Definition: dm-generic.c:441
struct resource * ts_resp
Per-CPU data.
Definition: raytrace.h:1074
void * idb_ptr
Definition: raytrace.h:195
struct bn_tol wdb_tol
Definition: raytrace.h:1269
struct db_tree_state wdb_initial_tree_state
Definition: raytrace.h:1267
void bn_vec_ortho(vect_t out, const vect_t in)
int idb_minor_type
ID_xxx.
Definition: raytrace.h:193
#define A
Definition: msr.c:51
#define INV_GED
Definition: clip.c:226
int rt_arb_std_type(const struct rt_db_internal *ip, const struct bn_tol *tol)
Definition: arb8.c:317
#define BRLCAD_ERROR
Definition: defines.h:72
int db_follow_path_for_state(struct db_tree_state *tsp, struct db_full_path *pathp, const char *orig_str, int noisy)
Definition: db_tree.c:839
double fastf_t
Definition: defines.h:300
void rt_db_free_internal(struct rt_db_internal *ip)
Definition: dir.c:216
Definition: color.c:50