BRL-CAD
axes.c
Go to the documentation of this file.
1 /* A X E 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 /** @file libdm/axes.c
21  *
22  * Functions -
23  * draw_axes Common axes drawing routine that draws axes at the
24  * specified point and orientation.
25  *
26  */
27 
28 #include "common.h"
29 
30 #include <math.h>
31 #include "vmath.h"
32 #include "bn.h"
33 #include "raytrace.h"
34 #include "dm.h"
35 #include "dm/bview.h"
36 #include "dm_private.h"
37 
38 
39 #if defined(IF_OGL) || defined(IF_WGL)
40 # ifdef HAVE_GL_GL_H
41 # include <GL/gl.h>
42 # endif
43 #endif
44 
45 void
47  fastf_t sf,
48  struct bview_data_axes_state *bndasp)
49 {
50  int i, j;
51  fastf_t halfAxesSize; /* half the length of an axis */
52  point_t ptA, ptB;
53  int npoints = bndasp->num_points * 6;
54  point_t *points;
55  /* Save the line attributes */
56  int saveLineWidth = dmp->dm_lineWidth;
57  int saveLineStyle = dmp->dm_lineStyle;
58 
59  if (npoints < 1)
60  return;
61 
62  /* set color */
63  dm_set_fg(dmp, bndasp->color[0], bndasp->color[1], bndasp->color[2], 1, 1.0);
64 
65 #if defined(IF_OGL) || defined(IF_WGL)
66  if (bndasp->draw > 1) {
67  if (dmp->dm_light)
68  glDisable(GL_LIGHTING);
69 
70  glPointSize(bndasp->size);
71  dm_draw_points_3d(dmp, bndasp->num_points, bndasp->points);
72  glPointSize(1);
73 
74  if (dmp->dm_light)
75  glEnable(GL_LIGHTING);
76 
77  return;
78  }
79 #endif
80 
81  points = (point_t *)bu_calloc(npoints, sizeof(point_t), "data axes points");
82  halfAxesSize = bndasp->size * 0.5 * sf;
83 
84  /* set linewidth */
85  dm_set_line_attr(dmp, bndasp->line_width, 0); /* solid lines */
86 
87  for (i = 0, j = -1; i < bndasp->num_points; ++i) {
88  /* draw X axis with x/y offsets */
89  VSET(ptA, bndasp->points[i][X] - halfAxesSize, bndasp->points[i][Y], bndasp->points[i][Z]);
90  VSET(ptB, bndasp->points[i][X] + halfAxesSize, bndasp->points[i][Y], bndasp->points[i][Z]);
91  ++j;
92  VMOVE(points[j], ptA);
93  ++j;
94  VMOVE(points[j], ptB);
95 
96  /* draw Y axis with x/y offsets */
97  VSET(ptA, bndasp->points[i][X], bndasp->points[i][Y] - halfAxesSize, bndasp->points[i][Z]);
98  VSET(ptB, bndasp->points[i][X], bndasp->points[i][Y] + halfAxesSize, bndasp->points[i][Z]);
99  ++j;
100  VMOVE(points[j], ptA);
101  ++j;
102  VMOVE(points[j], ptB);
103 
104  /* draw Z axis with x/y offsets */
105  VSET(ptA, bndasp->points[i][X], bndasp->points[i][Y], bndasp->points[i][Z] - halfAxesSize);
106  VSET(ptB, bndasp->points[i][X], bndasp->points[i][Y], bndasp->points[i][Z] + halfAxesSize);
107  ++j;
108  VMOVE(points[j], ptA);
109  ++j;
110  VMOVE(points[j], ptB);
111  }
112 
113  dm_draw_lines_3d(dmp, npoints, points, 0);
114  bu_free((void *)points, "data axes points");
115 
116  /* Restore the line attributes */
117  dm_set_line_attr(dmp, saveLineWidth, saveLineStyle);
118 }
119 
120 void
122  fastf_t viewSize, /* in mm */
123  const mat_t rmat, /* view rotation matrix */
124  struct bview_axes_state *bnasp)
125 {
126  fastf_t halfAxesSize; /* half the length of an axis */
127  fastf_t xlx, xly; /* X axis label position */
128  fastf_t ylx, yly; /* Y axis label position */
129  fastf_t zlx, zly; /* Z axis label position */
130  fastf_t l_offset = 0.0078125; /* axis label offset from axis endpoints */
131  point_t v2;
132  point_t rxv1, rxv2;
133  point_t ryv1, ryv2;
134  point_t rzv1, rzv2;
135  point_t o_rv2;
136  /* Save the line attributes */
137  int saveLineWidth = dmp->dm_lineWidth;
138  int saveLineStyle = dmp->dm_lineStyle;
139 
140  halfAxesSize = bnasp->axes_size * 0.5;
141 
142  /* set axes line width */
143  dm_set_line_attr(dmp, bnasp->line_width, 0); /* solid lines */
144 
145  /* build X axis about view center */
146  VSET(v2, halfAxesSize, 0.0, 0.0);
147 
148  /* rotate X axis into position */
149  MAT4X3PNT(rxv2, rmat, v2);
150  if (bnasp->pos_only) {
151  VSET(rxv1, 0.0, 0.0, 0.0);
152  } else {
153  VSCALE(rxv1, rxv2, -1.0);
154  }
155 
156  /* find the X axis label position about view center */
157  VSET(v2, v2[X] + l_offset, v2[Y] + l_offset, v2[Z] + l_offset);
158  MAT4X3PNT(o_rv2, rmat, v2);
159  xlx = o_rv2[X];
160  xly = o_rv2[Y];
161 
162  if (bnasp->triple_color) {
163  /* set X axis color - red */
164  dm_set_fg(dmp, 255, 0, 0, 1, 1.0);
165 
166  /* draw the X label */
167  dm_draw_string_2d(dmp, "X", xlx + bnasp->axes_pos[X], xly + bnasp->axes_pos[Y], 1, 1);
168  } else
169  /* set axes color */
170  dm_set_fg(dmp, bnasp->axes_color[0], bnasp->axes_color[1], bnasp->axes_color[2], 1, 1.0);
171 
172  /* draw X axis with x/y offsets */
173  dm_draw_line_2d(dmp, rxv1[X] + bnasp->axes_pos[X], (rxv1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
174  rxv2[X] + bnasp->axes_pos[X], (rxv2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
175 
176  /* build Y axis about view center */
177  VSET(v2, 0.0, halfAxesSize, 0.0);
178 
179  /* rotate Y axis into position */
180  MAT4X3PNT(ryv2, rmat, v2);
181  if (bnasp->pos_only) {
182  VSET(ryv1, 0.0, 0.0, 0.0);
183  } else {
184  VSCALE(ryv1, ryv2, -1.0);
185  }
186 
187  /* find the Y axis label position about view center */
188  VSET(v2, v2[X] + l_offset, v2[Y] + l_offset, v2[Z] + l_offset);
189  MAT4X3PNT(o_rv2, rmat, v2);
190  ylx = o_rv2[X];
191  yly = o_rv2[Y];
192 
193  if (bnasp->triple_color) {
194  /* set Y axis color - green */
195  dm_set_fg(dmp, 0, 255, 0, 1, 1.0);
196 
197  /* draw the Y label */
198  dm_draw_string_2d(dmp, "Y", ylx + bnasp->axes_pos[X], yly + bnasp->axes_pos[Y], 1, 1);
199  }
200 
201  /* draw Y axis with x/y offsets */
202  dm_draw_line_2d(dmp, ryv1[X] + bnasp->axes_pos[X], (ryv1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
203  ryv2[X] + bnasp->axes_pos[X], (ryv2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
204 
205  /* build Z axis about view center */
206  VSET(v2, 0.0, 0.0, halfAxesSize);
207 
208  /* rotate Z axis into position */
209  MAT4X3PNT(rzv2, rmat, v2);
210  if (bnasp->pos_only) {
211  VSET(rzv1, 0.0, 0.0, 0.0);
212  } else {
213  VSCALE(rzv1, rzv2, -1.0);
214  }
215 
216  /* find the Z axis label position about view center */
217  VSET(v2, v2[X] + l_offset, v2[Y] + l_offset, v2[Z] + l_offset);
218  MAT4X3PNT(o_rv2, rmat, v2);
219  zlx = o_rv2[X];
220  zly = o_rv2[Y];
221 
222  if (bnasp->triple_color) {
223  /* set Z axis color - blue*/
224  dm_set_fg(dmp, 0, 0, 255, 1, 1.0);
225 
226  /* draw the Z label */
227  dm_draw_string_2d(dmp, "Z", zlx + bnasp->axes_pos[X], zly + bnasp->axes_pos[Y], 1, 1);
228  }
229 
230  /* draw Z axis with x/y offsets */
231  dm_draw_line_2d(dmp, rzv1[X] + bnasp->axes_pos[X], (rzv1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
232  rzv2[X] + bnasp->axes_pos[X], (rzv2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
233 
234  if (!bnasp->triple_color) {
235  /* set axes string color */
236  dm_set_fg(dmp, bnasp->label_color[0], bnasp->label_color[1], bnasp->label_color[2], 1, 1.0);
237 
238  /* draw axes strings/labels with x/y offsets */
239  dm_draw_string_2d(dmp, "X", xlx + bnasp->axes_pos[X], xly + bnasp->axes_pos[Y], 1, 1);
240  dm_draw_string_2d(dmp, "Y", ylx + bnasp->axes_pos[X], yly + bnasp->axes_pos[Y], 1, 1);
241  dm_draw_string_2d(dmp, "Z", zlx + bnasp->axes_pos[X], zly + bnasp->axes_pos[Y], 1, 1);
242  }
243 
244  if (bnasp->tick_enabled) {
245  /* number of ticks in one direction of a coordinate axis */
246  int numTicks = viewSize / bnasp->tick_interval * 0.5 * halfAxesSize;
247  int doMajorOnly = 0;
248  int i;
249  vect_t xend1, xend2;
250  vect_t yend1, yend2;
251  vect_t zend1, zend2;
252  vect_t dir;
253  vect_t rxdir, neg_rxdir;
254  vect_t rydir, neg_rydir;
255  vect_t rzdir, neg_rzdir;
256  fastf_t interval;
257  fastf_t tlen;
258  fastf_t maj_tlen;
259  vect_t maj_xend1, maj_xend2;
260  vect_t maj_yend1, maj_yend2;
261  vect_t maj_zend1, maj_zend2;
262 
263  VSETALL(xend1, 0.0);
264  VSETALL(xend2, 0.0);
265  VSETALL(yend1, 0.0);
266  VSETALL(yend2, 0.0);
267  VSETALL(zend1, 0.0);
268  VSETALL(zend2, 0.0);
269 
270  if (dmp->dm_width <= numTicks / halfAxesSize * bnasp->tick_threshold * 2) {
271  int numMajorTicks = numTicks / bnasp->ticks_per_major;
272 
273  if (dmp->dm_width <= numMajorTicks / halfAxesSize * bnasp->tick_threshold * 2) {
274  /* Restore the line attributes */
275  dm_set_line_attr(dmp, saveLineWidth, saveLineStyle);
276  return;
277  }
278 
279  doMajorOnly = 1;
280  }
281 
282  /* convert tick interval in model space to view space */
283  interval = bnasp->tick_interval / viewSize * 2.0;
284 
285  /* convert tick length in pixels to view space */
286  tlen = bnasp->tick_length / (fastf_t)dmp->dm_width * 2.0;
287 
288  /* convert major tick length in pixels to view space */
289  maj_tlen = bnasp->tick_major_length / (fastf_t)dmp->dm_width * 2.0;
290 
291  if (!doMajorOnly) {
292  /* calculate end points for x ticks */
293  VSET(dir, tlen, 0.0, 0.0);
294  MAT4X3PNT(xend1, rmat, dir);
295  VSCALE(xend2, xend1, -1.0);
296 
297  /* calculate end points for y ticks */
298  VSET(dir, 0.0, tlen, 0.0);
299  MAT4X3PNT(yend1, rmat, dir);
300  VSCALE(yend2, yend1, -1.0);
301 
302  /* calculate end points for z ticks */
303  VSET(dir, 0.0, 0.0, tlen);
304  MAT4X3PNT(zend1, rmat, dir);
305  VSCALE(zend2, zend1, -1.0);
306  }
307 
308  /* calculate end points for major x ticks */
309  VSET(dir, maj_tlen, 0.0, 0.0);
310  MAT4X3PNT(maj_xend1, rmat, dir);
311  VSCALE(maj_xend2, maj_xend1, -1.0);
312 
313  /* calculate end points for major y ticks */
314  VSET(dir, 0.0, maj_tlen, 0.0);
315  MAT4X3PNT(maj_yend1, rmat, dir);
316  VSCALE(maj_yend2, maj_yend1, -1.0);
317 
318  /* calculate end points for major z ticks */
319  VSET(dir, 0.0, 0.0, maj_tlen);
320  MAT4X3PNT(maj_zend1, rmat, dir);
321  VSCALE(maj_zend2, maj_zend1, -1.0);
322 
323  /* calculate the rotated x direction vector */
324  VSET(dir, interval, 0.0, 0.0);
325  MAT4X3PNT(rxdir, rmat, dir);
326  VSCALE(neg_rxdir, rxdir, -1.0);
327 
328  /* calculate the rotated y direction vector */
329  VSET(dir, 0.0, interval, 0.0);
330  MAT4X3PNT(rydir, rmat, dir);
331  VSCALE(neg_rydir, rydir, -1.0);
332 
333  /* calculate the rotated z direction vector */
334  VSET(dir, 0.0, 0.0, interval);
335  MAT4X3PNT(rzdir, rmat, dir);
336  VSCALE(neg_rzdir, rzdir, -1.0);
337 
338  /* draw ticks along X axis */
339  for (i = 1; i <= numTicks; ++i) {
340  vect_t tvec;
341  point_t t1, t2;
342  int notMajor;
343 
344  if (bnasp->ticks_per_major == 0)
345  notMajor = 1;
346  else
347  notMajor = i % bnasp->ticks_per_major;
348 
349  /********* draw ticks along X *********/
350  /* positive X direction */
351  VSCALE(tvec, rxdir, i);
352 
353  /* draw tick in XY plane */
354  if (notMajor) {
355  if (doMajorOnly)
356  continue;
357 
358  /* set tick color */
359  dm_set_fg(dmp, bnasp->tick_color[0], bnasp->tick_color[1], bnasp->tick_color[2], 1, 1.0);
360 
361  VADD2(t1, yend1, tvec);
362  VADD2(t2, yend2, tvec);
363  } else {
364  /* set major tick color */
365  dm_set_fg(dmp, bnasp->tick_major_color[0], bnasp->tick_major_color[1], bnasp->tick_major_color[2], 1, 1.0);
366 
367  VADD2(t1, maj_yend1, tvec);
368  VADD2(t2, maj_yend2, tvec);
369  }
370  dm_draw_line_2d(dmp, t1[X] + bnasp->axes_pos[X], (t1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
371  t2[X] + bnasp->axes_pos[X], (t2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
372 
373  /* draw tick in XZ plane */
374  if (notMajor) {
375  VADD2(t1, zend1, tvec);
376  VADD2(t2, zend2, tvec);
377  } else {
378  VADD2(t1, maj_zend1, tvec);
379  VADD2(t2, maj_zend2, tvec);
380  }
381  dm_draw_line_2d(dmp, t1[X] + bnasp->axes_pos[X], (t1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
382  t2[X] + bnasp->axes_pos[X], (t2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
383 
384  if (!bnasp->pos_only) {
385  /* negative X direction */
386  VSCALE(tvec, neg_rxdir, i);
387 
388  /* draw tick in XY plane */
389  if (notMajor) {
390  VADD2(t1, yend1, tvec);
391  VADD2(t2, yend2, tvec);
392  } else {
393  VADD2(t1, maj_yend1, tvec);
394  VADD2(t2, maj_yend2, tvec);
395  }
396  dm_draw_line_2d(dmp, t1[X] + bnasp->axes_pos[X], (t1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
397  t2[X] + bnasp->axes_pos[X], (t2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
398 
399  /* draw tick in XZ plane */
400  if (notMajor) {
401  VADD2(t1, zend1, tvec);
402  VADD2(t2, zend2, tvec);
403  } else {
404  VADD2(t1, maj_zend1, tvec);
405  VADD2(t2, maj_zend2, tvec);
406  }
407  dm_draw_line_2d(dmp, t1[X] + bnasp->axes_pos[X], (t1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
408  t2[X] + bnasp->axes_pos[X], (t2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
409  }
410 
411  /********* draw ticks along Y *********/
412  /* positive Y direction */
413  VSCALE(tvec, rydir, i);
414 
415  /* draw tick in YX plane */
416  if (notMajor) {
417  VADD2(t1, xend1, tvec);
418  VADD2(t2, xend2, tvec);
419  } else {
420  VADD2(t1, maj_xend1, tvec);
421  VADD2(t2, maj_xend2, tvec);
422  }
423  dm_draw_line_2d(dmp, t1[X] + bnasp->axes_pos[X], (t1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
424  t2[X] + bnasp->axes_pos[X], (t2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
425 
426  /* draw tick in YZ plane */
427  if (notMajor) {
428  VADD2(t1, zend1, tvec);
429  VADD2(t2, zend2, tvec);
430  } else {
431  VADD2(t1, maj_zend1, tvec);
432  VADD2(t2, maj_zend2, tvec);
433  }
434  dm_draw_line_2d(dmp, t1[X] + bnasp->axes_pos[X], (t1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
435  t2[X] + bnasp->axes_pos[X], (t2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
436 
437  if (!bnasp->pos_only) {
438  /* negative Y direction */
439  VSCALE(tvec, neg_rydir, i);
440 
441  /* draw tick in YX plane */
442  if (notMajor) {
443  VADD2(t1, xend1, tvec);
444  VADD2(t2, xend2, tvec);
445  } else {
446  VADD2(t1, maj_xend1, tvec);
447  VADD2(t2, maj_xend2, tvec);
448  }
449  dm_draw_line_2d(dmp, t1[X] + bnasp->axes_pos[X], (t1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
450  t2[X] + bnasp->axes_pos[X], (t2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
451 
452  /* draw tick in XZ plane */
453  if (notMajor) {
454  VADD2(t1, zend1, tvec);
455  VADD2(t2, zend2, tvec);
456  } else {
457  VADD2(t1, maj_zend1, tvec);
458  VADD2(t2, maj_zend2, tvec);
459  }
460  dm_draw_line_2d(dmp, t1[X] + bnasp->axes_pos[X], (t1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
461  t2[X] + bnasp->axes_pos[X], (t2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
462  }
463 
464  /********* draw ticks along Z *********/
465  /* positive Z direction */
466  VSCALE(tvec, rzdir, i);
467 
468  /* draw tick in ZX plane */
469  if (notMajor) {
470  VADD2(t1, xend1, tvec);
471  VADD2(t2, xend2, tvec);
472  } else {
473  VADD2(t1, maj_xend1, tvec);
474  VADD2(t2, maj_xend2, tvec);
475  }
476  dm_draw_line_2d(dmp, t1[X] + bnasp->axes_pos[X], (t1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
477  t2[X] + bnasp->axes_pos[X], (t2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
478 
479  /* draw tick in ZY plane */
480  if (notMajor) {
481  VADD2(t1, yend1, tvec);
482  VADD2(t2, yend2, tvec);
483  } else {
484  VADD2(t1, maj_yend1, tvec);
485  VADD2(t2, maj_yend2, tvec);
486  }
487  dm_draw_line_2d(dmp, t1[X] + bnasp->axes_pos[X], (t1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
488  t2[X] + bnasp->axes_pos[X], (t2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
489 
490  if (!bnasp->pos_only) {
491  /* negative Z direction */
492  VSCALE(tvec, neg_rzdir, i);
493 
494  /* draw tick in ZX plane */
495  if (notMajor) {
496  VADD2(t1, xend1, tvec);
497  VADD2(t2, xend2, tvec);
498  } else {
499  VADD2(t1, maj_xend1, tvec);
500  VADD2(t2, maj_xend2, tvec);
501  }
502  dm_draw_line_2d(dmp, t1[X] + bnasp->axes_pos[X], (t1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
503  t2[X] + bnasp->axes_pos[X], (t2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
504 
505  /* draw tick in ZY plane */
506  if (notMajor) {
507  VADD2(t1, yend1, tvec);
508  VADD2(t2, yend2, tvec);
509  } else {
510  VADD2(t1, maj_yend1, tvec);
511  VADD2(t2, maj_yend2, tvec);
512  }
513  dm_draw_line_2d(dmp, t1[X] + bnasp->axes_pos[X], (t1[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect,
514  t2[X] + bnasp->axes_pos[X], (t2[Y] + bnasp->axes_pos[Y]) * dmp->dm_aspect);
515  }
516  }
517  }
518 
519  /* Restore the line attributes */
520  dm_set_line_attr(dmp, saveLineWidth, saveLineStyle);
521 }
522 
523 /*
524  * Local Variables:
525  * mode: C
526  * tab-width: 8
527  * indent-tabs-mode: t
528  * c-file-style: "stroustrup"
529  * End:
530  * ex: shiftwidth=4 tabstop=8
531  */
int dm_width
Definition: dm_private.h:91
fastf_t axes_size
Definition: bview.h:81
int ticks_per_major
Definition: bview.h:91
int tick_threshold
Definition: bview.h:92
fastf_t tick_interval
Definition: bview.h:90
int dm_draw_lines_3d(dm *dmp, int npoints, point_t *points, int sflag)
Definition: dm-generic.c:754
#define VSET(a, b, c, d)
Definition: color.c:53
#define VSETALL(a, s)
Definition: color.c:54
int tick_length
Definition: bview.h:88
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
int axes_color[3]
Definition: bview.h:84
Header file for the BRL-CAD common definitions.
int line_width
Definition: bview.h:82
int dm_light
!0 means lighting on
Definition: dm_private.h:112
fastf_t dm_aspect
Definition: dm_private.h:97
void dm_draw_axes(dm *dmp, fastf_t viewSize, const mat_t rmat, struct bview_axes_state *bnasp)
Definition: axes.c:121
int tick_major_length
Definition: bview.h:89
Definition: color.c:49
int dm_draw_points_3d(dm *dmp, int npoints, point_t *points)
Definition: dm-generic.c:772
int label_color[3]
Definition: bview.h:85
int tick_major_color[3]
Definition: bview.h:94
void * bu_calloc(size_t nelem, size_t elsize, const char *str)
Definition: malloc.c:321
point_t * points
Definition: bview.h:103
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
int dm_lineWidth
Definition: dm_private.h:95
point_t axes_pos
Definition: bview.h:80
int triple_color
Definition: bview.h:86
int tick_color[3]
Definition: bview.h:93
int tick_enabled
Definition: bview.h:87
int pos_only
Definition: bview.h:83
Definition: color.c:51
int dm_set_line_attr(dm *dmp, int width, int style)
Definition: dm-generic.c:617
void bu_free(void *ptr, const char *str)
Definition: malloc.c:328
int dm_draw_line_2d(dm *dmp, fastf_t x1, fastf_t y1_2d, fastf_t x2, fastf_t y2)
Definition: dm-generic.c:741
double fastf_t
Definition: defines.h:300
void dm_draw_data_axes(dm *dmp, fastf_t sf, struct bview_data_axes_state *bndasp)
Definition: axes.c:46
int dm_lineStyle
Definition: dm_private.h:96
Definition: color.c:50