BRL-CAD
edit_metaball.c File Reference
#include "common.h"
#include <string.h>
#include "bu/cmd.h"
#include "rtgeom.h"
#include "raytrace.h"
#include "wdb.h"
#include "./ged_private.h"
Include dependency graph for edit_metaball.c:

Go to the source code of this file.

Macros

#define GED_METABALL_SCALE(_d, _scale)
 

Functions

int _ged_get_metaball_i_pt (struct rt_metaball_internal *mbip, struct wdb_metaballpt *mbpp)
 
struct wdb_metaballpt * _ged_get_metaball_pt_i (struct rt_metaball_internal *mbip, int mbp_i)
 
int _ged_set_metaball (struct ged *gedp, struct rt_metaball_internal *mbip, const char *attribute, fastf_t sf)
 
int _ged_scale_metaball (struct ged *gedp, struct rt_metaball_internal *mbip, const char *attribute, fastf_t sf, int rflag)
 
struct wdb_metaballpt * find_metaballpt_nearest_pt (const struct bu_list *metaball_hd, const point_t model_pt, matp_t view2model)
 
int ged_find_metaballpt_nearest_pt (struct ged *gedp, int argc, const char *argv[])
 
struct wdb_metaballpt * _ged_add_metaballpt (struct rt_metaball_internal *mbip, struct wdb_metaballpt *mbp, const point_t new_pt)
 
int ged_add_metaballpt (struct ged *gedp, int argc, const char *argv[])
 
struct wdb_metaballpt * _ged_delete_metaballpt (struct wdb_metaballpt *mbp)
 
int ged_delete_metaballpt (struct ged *gedp, int argc, const char *argv[])
 
int ged_move_metaballpt (struct ged *gedp, int argc, const char *argv[])
 

Detailed Description

Functions -

Definition in file edit_metaball.c.

Macro Definition Documentation

#define GED_METABALL_SCALE (   _d,
  _scale 
)
Value:
if ((_scale) < 0.0) \
(_d) = -(_scale); \
(_d) *= (_scale);
else
Definition: nmg_mod.c:3872

Definition at line 39 of file edit_metaball.c.

Referenced by _ged_scale_metaball().

Function Documentation

int _ged_get_metaball_i_pt ( struct rt_metaball_internal *  mbip,
struct wdb_metaballpt *  mbpp 
)

Definition at line 50 of file edit_metaball.c.

References BU_LIST_FOR.

Referenced by ged_find_metaballpt_nearest_pt().

struct wdb_metaballpt* _ged_get_metaball_pt_i ( struct rt_metaball_internal *  mbip,
int  mbp_i 
)

Definition at line 70 of file edit_metaball.c.

References BU_LIST_FOR.

Referenced by _ged_scale_metaball(), ged_delete_metaballpt(), and ged_move_metaballpt().

int _ged_set_metaball ( struct ged gedp,
struct rt_metaball_internal *  mbip,
const char *  attribute,
fastf_t  sf 
)

Definition at line 87 of file edit_metaball.c.

References bu_vls_printf(), GED_ERROR, GED_OK, and ged::ged_result_str.

Referenced by ged_pset().

Here is the call graph for this function:

int _ged_scale_metaball ( struct ged gedp,
struct rt_metaball_internal *  mbip,
const char *  attribute,
fastf_t  sf,
int  rflag 
)

Definition at line 120 of file edit_metaball.c.

References _ged_get_metaball_pt_i(), BU_CKMAG, bu_vls_printf(), GED_ERROR, GED_METABALL_SCALE, GED_OK, ged::ged_result_str, and WDB_METABALLPT_MAGIC.

Referenced by ged_pscale().

Here is the call graph for this function:

struct wdb_metaballpt* find_metaballpt_nearest_pt ( const struct bu_list metaball_hd,
const point_t  model_pt,
matp_t  view2model 
)

Definition at line 165 of file edit_metaball.c.

References bn_dist_line3_pt3(), BN_TOL_MAGIC, BU_LIST_FOR, bn_tol::dist, bn_tol::dist_sq, bn_tol::magic, MAX_FASTF, bn_tol::para, bn_tol::perp, and VSET.

Referenced by ged_find_metaballpt_nearest_pt().

Here is the call graph for this function:

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

Find the metaball point nearest the specified point in model coordinates.

Definition at line 198 of file edit_metaball.c.

References _ged_get_metaball_i_pt(), bu_vls_printf(), bu_vls_trunc(), db_lookup(), rt_wdb::dbip, find_metaballpt_nearest_pt(), 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_view2model, rt_db_internal::idb_ptr, LOOKUP_QUIET, rt_db_free_internal(), RT_DIR_NULL, usage(), wdb_import_from_path2(), X, Y, and Z.

Referenced by to_mouse_find_metaballpt().

Here is the call graph for this function:

struct wdb_metaballpt* _ged_add_metaballpt ( struct rt_metaball_internal *  mbip,
struct wdb_metaballpt *  mbp,
const point_t  new_pt 
)
int ged_add_metaballpt ( struct ged gedp,
int  argc,
const char *  argv[] 
)
struct wdb_metaballpt* _ged_delete_metaballpt ( struct wdb_metaballpt *  mbp)
int ged_delete_metaballpt ( struct ged gedp,
int  argc,
const char *  argv[] 
)
int ged_move_metaballpt ( struct ged gedp,
int  argc,
const char *  argv[] 
)