45 # if defined(GED_DLL_EXPORTS) && defined(GED_DLL_IMPORTS)
46 # error "Only GED_DLL_EXPORTS or GED_DLL_IMPORTS can be defined, not both."
47 # elif defined(GED_DLL_EXPORTS)
48 # define GED_EXPORT COMPILER_DLLEXPORT
49 # elif defined(GED_DLL_IMPORTS)
50 # define GED_EXPORT COMPILER_DLLIMPORT
56 #define GED_VMIN -2048.0
57 #define GED_VMAX 2047.0
58 #define GED_VRANGE 4095.0
59 #define INV_GED_V 0.00048828125
60 #define INV_4096_V 0.000244140625
62 #define GED_NULL ((struct ged *)0)
63 #define GED_DISPLAY_LIST_NULL ((struct display_list *)0)
64 #define GED_DRAWABLE_NULL ((struct ged_drawable *)0)
65 #define GED_VIEW_NULL ((struct bview *)0)
67 #define GED_RESULT_NULL ((void *)0)
71 #define GED_HELP 0x0002
72 #define GED_MORE 0x0004
73 #define GED_QUIET 0x0008
74 #define GED_UNKNOWN 0x0010
75 #define GED_EXIT 0x0020
79 struct ged_selection_set;
82 #define GED_FUNC_PTR_NULL ((ged_func_ptr)0)
90 struct ged_callback_state;
96 #define GED_SEM_WORKER ANALYZE_SEM_LAST
97 #define GED_SEM_STATS GED_SEM_WORKER+1
98 #define GED_SEM_LIST GED_SEM_STATS+1
99 #define GED_SEM_LAST GED_SEM_LIST+1
101 #define GED_INIT(_gedp, _wdbp) { \
103 (_gedp)->dbip = NULL; \
104 if ((struct rt_wdb *)(_wdbp) != NULL) {\
105 (_gedp)->dbip = ((struct rt_wdb *)(_wdbp))->dbip; \
109 #define GED_INITIALIZED(_gedp) ((_gedp)->dbip != NULL)
110 #define GED_LOCAL2BASE(_gedp) ((_gedp)->dbip->dbi_local2base)
111 #define GED_BASE2LOCAL(_gedp) ((_gedp)->dbip->dbi_base2local)
114 #define GED_MAX 2047.0
115 #define GED_MIN -2048.0
116 #define GED_RANGE 4095.0
117 #define INV_GED 0.00048828125
118 #define INV_4096 0.000244140625
121 #define RT_VDRW_PREFIX "_VDRW"
122 #define RT_VDRW_PREFIX_LEN 6
123 #define RT_VDRW_MAXNAME 31
124 #define RT_VDRW_DEF_COLOR 0xffff00
129 struct bu_process *
p;
159 #define VD_CURVE_NULL ((struct vd_curve *)NULL)
267 int (*
del)(
struct ged *gedp,
const char *name);
268 int (*
run)(
struct ged *gedp,
int ac,
char *av[]);
359 GED_EXPORT
extern const char *
ged_results_get(
struct ged_results *results,
size_t index);
370 const char *filename,
379 #define GED_CHECK_ARGC_GT_0(_gedp, _argc, _flags) \
381 int ged_check_argc_gt_0_quiet = (_flags) & GED_QUIET; \
382 if (!ged_check_argc_gt_0_quiet) { \
383 bu_vls_trunc((_gedp)->ged_result_str, 0); \
384 bu_vls_printf((_gedp)->ged_result_str, "Command name not provided on (%s:%d).", __FILE__, __LINE__); \
392 struct ged_cmd_impl *
i;
402 struct ged_cmd_process_impl;
404 struct ged_cmd_process_impl *
i;
Header file for the BRL-CAD common definitions.
This header holds generic routines and data structures used for TCP based communication between a fra...
struct bu_hash_tbl bu_hash_tbl
int(* db_search_callback_t)(int, const char *[], void *)
void ged_close(struct ged *gedp)
struct ged * ged_open(const char *dbtype, const char *filename, int existing_only)
const char * ged_results_get(struct ged_results *results, size_t index)
int(* ged_process_ptr)(int, const char *[])
void(* ged_refresh_func_t)(void *)
int(* ged_func_ptr)(struct ged *, int, const char *[])
size_t ged_results_count(struct ged_results *results)
void ged_results_clear(struct ged_results *results)
void ged_free(struct ged *gedp)
void(* ged_destroy_vlist_func_t)(unsigned int, int)
void(* ged_create_vlist_display_list_func_t)(struct display_list *)
void ged_results_free(struct ged_results *results)
void(* ged_create_vlist_solid_func_t)(struct bv_scene_obj *)
const char * ged_init_msgs(void)
void(* ged_io_func_t)(void *, int)
void ged_init(struct ged *gedp)
struct ged_cmd_process_impl * i
struct bu_vls gd_qray_basename
basename of query ray vlist
int gd_qray_cmd_echo
0 - don't echo command, 1 - echo command
struct bu_list * gd_headVDraw
head of vdraw list
struct ged_qray_color gd_qray_odd_color
struct ged_qray_color gd_qray_overlap_color
struct bu_vls gd_qray_script
query ray script
void(* gd_rtCmdNotify)(int aborted)
function called when rt command completes
int gd_shaded_mode
1 - draw bots shaded by default
struct ged_qray_color gd_qray_void_color
struct ged_qray_color gd_qray_even_color
struct ged_qray_fmt * gd_qray_fmts
char gd_qray_effects
t for text, g for graphics or b for both
struct bu_list * gd_headDisplay
head of display list
int gd_uplotOutputMode
output mode for unix plots
struct vd_curve * gd_currVHead
current vdraw head
const struct ged_cmd **const cmds
const struct ged_cmd_process *const p
uint32_t magic
magic number
void(* end_clbk)(int, void *)
function called when process completes
struct fbserv_obj * ged_fbs
void(* ged_output_handler)(struct ged *, char *)
function for handling output
void(* fbs_open_server_handler)(struct fbserv_obj *)
platform/toolkit method to open listener handler
struct bu_vls * ged_result_str
void(* ged_create_vlist_scene_obj_callback)(struct bv_scene_obj *)
function to call after creating a vlist to create display list for solid
void * ged_subprocess_clbk_context
int(* run)(struct ged *gedp, int ac, char *av[])
int(* del)(struct ged *gedp, const char *name)
int(* fbs_listen_on_port)(struct fbserv_obj *, int)
return 1 on success, 0 on failure
struct ged_results * ged_results
void(* ged_subprocess_end_callback)(int, void *)
function called when process completes
void(* fbs_close_server_handler)(struct fbserv_obj *)
platform/toolkit method to close handler listener
db_search_callback_t ged_interp_eval
void(* ged_pre_closedb_callback)(struct ged *, void *)
struct ged_callback_state * ged_cbs
void(* ged_create_io_handler)(struct ged_subprocess *gp, bu_process_io_t d, ged_io_func_t callback, void *data)
void(* ged_post_closedb_callback)(struct ged *, void *)
void * ged_db_callback_udata
todo this probably should be handled with a registration function of some kind void * ged_ctx
struct bu_ptbl free_solids
void(* ged_post_opendb_callback)(struct ged *, void *)
void(* ged_delete_io_handler)(struct ged_subprocess *gp, bu_process_io_t fd)
void * ged_refresh_clientdata
client data passed to refresh handler
int(* add)(struct ged *gedp, const struct ged_cmd *cmd)
struct bu_hash_tbl * ged_selections
object name -> struct rt_object_selections
struct ged_drawable * ged_gdp
void(* ged_subprocess_init_callback)(int, void *)
function called when process starts
void(* ged_refresh_handler)(void *)
function for handling refresh requests
void(* fbs_close_client_handler)(struct fbserv_obj *, int)
platform/toolkit method to close handler for client at index client_id
struct bu_ptbl ged_subp
forked sub-processes
char * ged_output_script
script for use by the outputHandler
struct bview_set ged_views
void(* ged_create_vlist_display_list_callback)(struct display_list *)
function to call after all vlist created that loops through creating display list for each solid
struct bu_ptbl ged_free_views
void * u_data
User data associated with this ged instance.
void(* ged_pre_opendb_callback)(struct ged *, void *)
struct bv_mesh_lod_context * ged_lod
void(* fbs_open_client_handler)(struct fbserv_obj *, int, void *)
platform/toolkit specific client handler setup (called by fbs_new_client)
void(* ged_destroy_vlist_callback)(unsigned int, int)
function to call after freeing a vlist
int(* fbs_is_listening)(struct fbserv_obj *)
return 1 if listening, else 0
char vdc_name[RT_VDRW_MAXNAME+1]
name array
struct bu_list vdc_vhd
head of list of vertices