BRL-CAD
edbot.c File Reference
#include "common.h"
#include <math.h>
#include <string.h>
#include "vmath.h"
#include "nmg.h"
#include "rtgeom.h"
#include "ged.h"
#include "nurb.h"
#include "wdb.h"
Include dependency graph for edbot.c:

Go to the source code of this file.

Functions

int ged_bot_edge_split (struct ged *gedp, int argc, const char *argv[])
 
int ged_bot_face_split (struct ged *gedp, int argc, const char *argv[])
 
int ged_find_bot_edge_nearest_pt (struct ged *gedp, int argc, const char *argv[])
 
int ged_find_botpt_nearest_pt (struct ged *gedp, int argc, const char *argv[])
 
int ged_get_bot_edges (struct ged *gedp, int argc, const char *argv[])
 
int ged_move_botpt (struct ged *gedp, int argc, const char *argv[])
 
int ged_move_botpts (struct ged *gedp, int argc, const char *argv[])
 
int _ged_select_botpts (struct ged *gedp, struct rt_bot_internal *botip, double vx, double vy, double vwidth, double vheight, double vminz, int rflag)
 

Function Documentation

int ged_bot_edge_split ( struct ged gedp,
int  argc,
const char *  argv[] 
)

Split the specified bot edge. This splits the triangles that share the edge.

Definition at line 38 of file edbot.c.

References bu_realloc(), bu_sscanf(), bu_vls_printf(), bu_vls_trunc(), db_lookup(), rt_wdb::dbip, GED_CHECK_ARGC_GT_0, GED_CHECK_DATABASE_OPEN, GED_DB_PUT_INTERNAL, GED_ERROR, GED_HELP, GED_OK, ged::ged_result_str, ged::ged_wdbp, rt_db_internal::idb_major_type, rt_db_internal::idb_minor_type, rt_db_internal::idb_ptr, if(), LOOKUP_QUIET, rt_db_free_internal(), RT_DIR_NULL, rt_uniresource, usage(), and wdb_import_from_path2().

Referenced by to_bot_edge_split().

Here is the call graph for this function:

int ged_bot_face_split ( struct ged gedp,
int  argc,
const char *  argv[] 
)

Split the specified bot face into three parts (i.e. by adding a point to the center)

Definition at line 182 of file edbot.c.

References bu_realloc(), bu_sscanf(), bu_vls_printf(), bu_vls_trunc(), db_lookup(), rt_wdb::dbip, GED_CHECK_ARGC_GT_0, GED_CHECK_DATABASE_OPEN, GED_DB_PUT_INTERNAL, GED_ERROR, GED_HELP, GED_OK, ged::ged_result_str, ged::ged_wdbp, rt_db_internal::idb_major_type, rt_db_internal::idb_minor_type, rt_db_internal::idb_ptr, if(), LOOKUP_QUIET, rt_db_free_internal(), RT_DIR_NULL, rt_uniresource, usage(), and wdb_import_from_path2().

Referenced by to_bot_face_split().

Here is the call graph for this function:

int ged_find_bot_edge_nearest_pt ( struct ged gedp,
int  argc,
const char *  argv[] 
)

Find the bot edge nearest the specified point in view coordinates.

Definition at line 294 of file edbot.c.

References bu_sscanf(), bu_vls_printf(), bu_vls_trunc(), GED_CHECK_ARGC_GT_0, GED_CHECK_DATABASE_OPEN, GED_CHECK_VIEW, GED_ERROR, ged::ged_gvp, GED_HELP, GED_OK, ged::ged_result_str, ged::ged_wdbp, bview::gv_model2view, rt_db_internal::idb_major_type, rt_db_internal::idb_minor_type, rt_db_internal::idb_ptr, rt_bot_find_e_nearest_pt2(), rt_db_free_internal(), usage(), wdb_import_from_path2(), X, Y, and Z.

Referenced by to_mouse_find_bot_edge().

Here is the call graph for this function:

int ged_find_botpt_nearest_pt ( struct ged gedp,
int  argc,
const char *  argv[] 
)

Find the bot point nearest the specified point in view coordinates.

Definition at line 353 of file edbot.c.

References bu_sscanf(), bu_vls_printf(), bu_vls_trunc(), GED_CHECK_ARGC_GT_0, GED_CHECK_DATABASE_OPEN, GED_CHECK_VIEW, GED_ERROR, ged::ged_gvp, GED_HELP, GED_OK, ged::ged_result_str, ged::ged_wdbp, bview::gv_model2view, rt_db_internal::idb_major_type, rt_db_internal::idb_minor_type, rt_db_internal::idb_ptr, rt_bot_find_v_nearest_pt2(), rt_db_free_internal(), usage(), wdb_import_from_path2(), X, Y, and Z.

Referenced by to_mouse_find_botpt().

Here is the call graph for this function:

int ged_get_bot_edges ( struct ged gedp,
int  argc,
const char *  argv[] 
)

Get a bot's edges

Definition at line 413 of file edbot.c.

References bu_free(), bu_vls_printf(), bu_vls_trunc(), GED_CHECK_ARGC_GT_0, GED_CHECK_DATABASE_OPEN, GED_ERROR, GED_HELP, GED_OK, ged::ged_result_str, ged::ged_wdbp, rt_db_internal::idb_major_type, rt_db_internal::idb_minor_type, rt_db_internal::idb_ptr, if(), rt_bot_get_edge_list(), rt_db_free_internal(), usage(), and wdb_import_from_path2().

Here is the call graph for this function:

int ged_move_botpt ( struct ged gedp,
int  argc,
const char *  argv[] 
)

Move the specified bot point. This can be relative or absolute.

Definition at line 468 of file edbot.c.

References bn_mat_inv(), bu_sscanf(), bu_vls_printf(), bu_vls_trunc(), db_lookup(), db_i::dbi_local2base, rt_wdb::dbip, GED_CHECK_ARGC_GT_0, GED_CHECK_DATABASE_OPEN, GED_DB_PUT_INTERNAL, GED_ERROR, GED_HELP, GED_OK, ged::ged_result_str, ged::ged_wdbp, rt_db_internal::idb_major_type, rt_db_internal::idb_minor_type, rt_db_internal::idb_ptr, if(), LOOKUP_QUIET, rt_db_free_internal(), RT_DIR_NULL, rt_uniresource, usage(), wdb_import_from_path2(), X, Y, and Z.

Referenced by to_mouse_move_botpt(), and to_move_botpt().

Here is the call graph for this function:

int ged_move_botpts ( struct ged gedp,
int  argc,
const char *  argv[] 
)

Move the specified bot points. This movement is always relative.

Definition at line 585 of file edbot.c.

References bn_mat_inv(), bu_sscanf(), bu_vls_printf(), bu_vls_trunc(), db_lookup(), db_i::dbi_local2base, rt_wdb::dbip, GED_CHECK_ARGC_GT_0, GED_CHECK_DATABASE_OPEN, GED_DB_PUT_INTERNAL, GED_ERROR, GED_HELP, GED_OK, ged::ged_result_str, ged::ged_wdbp, rt_db_internal::idb_major_type, rt_db_internal::idb_minor_type, rt_db_internal::idb_ptr, LOOKUP_QUIET, rt_db_free_internal(), RT_DIR_NULL, rt_uniresource, usage(), wdb_import_from_path2(), X, Y, and Z.

Referenced by to_mouse_move_botpts(), and to_move_botpts().

Here is the call graph for this function:

int _ged_select_botpts ( struct ged gedp,
struct rt_bot_internal *  botip,
double  vx,
double  vy,
double  vwidth,
double  vheight,
double  vminz,
int  rflag 
)

Definition at line 688 of file edbot.c.

References bu_vls_printf(), GED_CHECK_DATABASE_OPEN, GED_CHECK_VIEW, GED_ERROR, ged::ged_gvp, GED_OK, ged::ged_result_str, bview::gv_model2view, VSET, X, Y, and Z.

Referenced by ged_rselect(), and ged_select().

Here is the call graph for this function: