|
| struct rt_edit * | rt_edit_create (struct db_full_path *dfp, struct db_i *dbip, struct bn_tol *, struct bview *v) |
| |
| void | rt_edit_destroy (struct rt_edit *s) |
| |
| void | rt_edit_reset (struct rt_edit *s) |
| |
| int | rt_edit_reinit (struct rt_edit *s, struct db_full_path *dfp, struct db_i *dbip, struct bn_tol *tol, struct bview *v) |
| |
| int | rt_edit_set_opt (struct rt_edit *s, const char *key, const char *val) |
| |
| const char * | rt_edit_get_opt (struct rt_edit *s, const char *key) |
| |
| void | rt_edit_set_str (struct rt_edit *s, int index, const char *str) |
| |
| struct rt_edit_map * | rt_edit_map_create (void) |
| |
| void | rt_edit_map_destroy (struct rt_edit_map *) |
| |
| int | rt_edit_map_clbk_set (struct rt_edit_map *em, int ed_cmd, int mode, bu_clbk_t f, void *d) |
| |
| int | rt_edit_map_clbk_get (bu_clbk_t *f, void **d, struct rt_edit_map *em, int ed_cmd, int mode) |
| |
| int | rt_edit_map_clear (struct rt_edit_map *m) |
| |
| int | rt_edit_map_copy (struct rt_edit_map *om, struct rt_edit_map *im) |
| |
| void | rt_get_solid_keypoint (struct rt_edit *s, point_t *pt, const char **strp, fastf_t *mat) |
| |
| void | rt_edit_set_edflag (struct rt_edit *s, int edflag) |
| |
| int | rt_edit_knob_cmd_process (struct rt_edit *s, vect_t *rvec, int *do_rot, vect_t *tvec, int *do_tran, int *do_sca, struct bview *v, const char *cmd, fastf_t f, char origin, int incr_flag, void *u_data) |
| |
| void | rt_knob_edit_rot (struct rt_edit *s, char coords, char rotate_about, int matrix_edit, mat_t newrot) |
| |
| void | rt_knob_edit_tran (struct rt_edit *s, char coords, int matrix_edit, const vect_t tvec) |
| |
| void | rt_knob_edit_sca (struct rt_edit *s, int matrix_edit) |
| |
| void | rt_edit_process (struct rt_edit *s) |
| |
| void | rt_edit_snap_point (point2d_t pt, const struct rt_edit *s) |
| |
| int | rt_edit_checkpoint (struct rt_edit *s) |
| |
| int | rt_edit_revert (struct rt_edit *s) |
| |
| int | rt_edit_prim_desc_to_json (struct bu_vls *out, const struct rt_edit_prim_desc *desc) |
| |
| int | rt_edit_type_to_json (struct bu_vls *out, int prim_type_id) |
| |
| void | rt_constraint_edit_violation_init (struct rt_constraint_edit_violation *v) |
| |
| void | rt_constraint_edit_violation_free (struct rt_constraint_edit_violation *v) |
| |
| void | rt_constraint_edit_result_init (struct rt_constraint_edit_result *r) |
| |
| void | rt_constraint_edit_result_clear (struct rt_constraint_edit_result *r) |
| |
| void | rt_constraint_edit_result_free (struct rt_constraint_edit_result *r) |
| |
NOTE!!! This API is a work in progress as we migrate and consolidate editing code from MGED, libged and other codes to a unified common implementation in LIBRT. Until this notice is removed, there are NO guarantees of API stability with this code!
Design notes:
Aside from the X/Y/Z-only scale operations, the "generic" operations for both sed and oed seem to differ primarily in that the former update the wireframe and primitive parameters immediately, and the latter manipulate only the matrix until the final step. In the oed case, the altered primitive wireframes are handled by using the working matrix to distort the existing draw solids.
It feels like there should be some sort of consolidation possible here - in the case where an operation (sed or oed) doesn't need a new wireframe, reusing an existing one is a sensible approach. For operations on large combs, which may involve thousands of large wireframes, reuse is key. Rather than have two "modes", what we should do instead is have the edit operations themselves determine if a new wireframe is needed. If not, then no matter what the op is we should try to reuse an existing wireframe (if one is available from the app) and only generate one if the app does not have the one we need available. That may allow us to completely eliminate the distinction between sed and oed, and treat comb edits like any other primitive edits by using functab methods (semi-related is the attempt to make a comb tess method in d1dc6a4fae8).
Such changes would involve a significant update to the MGED drawing logic, which uses a very simple UP/DOWN flag trick to turn existing solid wireframes into the edit wireframes (and comes with some significant limitations as well). What we really need is a way for a scene obj to reference another scene obj and override specific values, so we can point to an existing scene obj and use it for edit drawing without having to do anything to the original obj except flagging it as involved (so the main update pass knows to skip drawing it.) Commit de2c0da2d4a has a bit of what would be needed for that to work, but there's a lot more to think about both in the original and new draw cycles. To properly have the edit drawing independent of other uses of geometry in a scene while still enabling vlist reuse (which the new drawing path isn't really doing properly) we may need to have all comb instances define themselves in a scene as an object that references another scene object which isn't drawn but holds the data defining the vlist. Then the instance obj would just hold the matrix and any override info for color, etc. Need to check how MGED is handling comb instances now, the new drawing layer I think is just creating a new bv_scene_obj for each instance with its own vlist...
Definition in file edit.h.