BRL-CAD
globals.c
Go to the documentation of this file.
1 /* G L O B A L S . C
2  * BRL-CAD
3  *
4  * Copyright (c) 2004-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 /** @addtogroup librt */
21 /** @{ */
22 /** @file librt/globals.c
23  *
24  * Global variables in LIBRT.
25  *
26  * New global variables are discouraged and refactoring in ways that
27  * eliminates existing global variables without reducing functionality
28  * is always encouraged.
29  *
30  */
31 /** @} */
32 
33 #include "common.h"
34 
35 #include "raytrace.h"
36 #include "db.h"
37 
38 
40 
42 
43 void (*nmg_plot_anim_upcall)(void);
44 
46 
48 
49 double nmg_eue_dist = 0.05;
50 
51 /**
52  * this array depends on the values of the definitions of the
53  * DB5_MINORTYPE_BINU_* in db5.h
54  */
55 const char *binu_types[] = {
56  NULL,
57  NULL,
58  "binary(float)",
59  "binary(double)",
60  "binary(u_8bit_int)",
61  "binary(u_16bit_int)",
62  "binary(u_32bit_int)",
63  "binary(u_64bit_int)",
64  NULL,
65  NULL,
66  NULL,
67  NULL,
68  "binary(8bit_int)",
69  "binary(16bit_int)",
70  "binary(32bit_int)",
71  "binary(64bit_int)"
72 };
73 
74 /* see table.c for primitive object function table definition */
75 extern const struct rt_functab OBJ[];
76 
77 
79 
80 /**
81  * minimum number of bot pieces
82  */
84 
85 /**
86  * minimum triangles per piece
87  */
89 
91  RT_DBTS_MAGIC, /* magic */
92  0, /* ts_dbip */
93  0, /* ts_sofar */
94  0, 0, 0, 0, /* region, air, gmater, LOS */
95  { /* struct mater_info ts_mater */
96  VINITALL(1.0), /* color, RGB */
97  -1.0, /* Temperature */
98  0, /* ma_color_valid=0 --> use default */
99  DB_INH_LOWER, /* color inherit */
100  DB_INH_LOWER, /* mater inherit */
101  NULL /* shader */
102  },
103  MAT_INIT_IDN,
104  REGION_NON_FASTGEN, /* ts_is_fastgen */
105  {
106  /* attribute value set */
107  BU_AVS_MAGIC,
108  0,
109  0,
110  NULL,
111  NULL,
112  NULL
113  },
114  0, /* ts_stop_at_regions */
115  NULL, /* ts_region_start_func */
116  NULL, /* ts_region_end_func */
117  NULL, /* ts_leaf_func */
118  NULL, /* ts_ttol */
119  NULL, /* ts_tol */
120  NULL, /* ts_m */
121  NULL, /* ts_rtip */
122  NULL /* ts_resp */
123 };
124 
125 
126 /*
127  * Local Variables:
128  * mode: C
129  * tab-width: 8
130  * indent-tabs-mode: t
131  * c-file-style: "stroustrup"
132  * End:
133  * ex: shiftwidth=4 tabstop=8
134  */
const struct db_tree_state rt_initial_tree_state
Definition: globals.c:90
#define BU_AVS_MAGIC
Definition: magic.h:46
Header file for the BRL-CAD common definitions.
const char * binu_types[]
Definition: globals.c:55
size_t rt_bot_minpieces
Definition: globals.c:83
fastf_t rt_cline_radius
Definition: globals.c:78
struct resource rt_uniresource
default. Defined in librt/globals.c
Definition: globals.c:41
#define RT_DEFAULT_TRIS_PER_PIECE
Definition: raytrace.h:1414
#define RT_DBTS_MAGIC
Definition: magic.h:157
#define RT_RESOURCE_INIT_ZERO
Definition: raytrace.h:1491
#define REGION_NON_FASTGEN
Definition: raytrace.h:553
const struct rt_functab OBJ[]
Definition: table.c:159
void(* nmg_plot_anim_upcall)(void)
Definition: globals.c:43
#define RT_DEFAULT_MINPIECES
Definition: raytrace.h:1413
#define RT_G_INIT_ZERO
Definition: raytrace.h:1702
double nmg_eue_dist
Definition: globals.c:49
void(* nmg_mged_debug_display_hack)(void)
Definition: globals.c:47
size_t rt_bot_tri_per_piece
Definition: globals.c:88
double fastf_t
Definition: defines.h:300
void(* nmg_vlblock_anim_upcall)(void)
Definition: globals.c:45
struct rt_g RTG
Definition: globals.c:39