void create_scalebbox(worldptr world) { vfeptr thisvfe; evfptr thisevf; fveptr thisfve; ; /* scalebbox_obj is a global object that gets copied when primary */ /* world objects get picked, so that they can be scaled. */ scalebbox_obj = create_cube(environment_world,100.0,100.0,100.0); scalebbox_obj->drawtechnique = draw_scalebbox_technique; scalebbox_obj->selectechnique = set_scalebbox_selectable; set_object_name(scalebbox_obj,"Scalebbox"); add_property((featureptr) scalebbox_obj, transparent_prop); add_property((featureptr) scalebbox_obj, noshadow_prop); add_property((featureptr) scalebbox_obj, sectioninvisible_prop); add_property((featureptr) scalebbox_obj, selectinvisible_prop); add_property((featureptr) scalebbox_obj, pickedinvisible_prop); add_property((featureptr) scalebbox_obj, scalebbox_prop); del_property((featureptr) scalebbox_obj, visible_prop); thisvfe = First_obj_vfe(scalebbox_obj); while (thisvfe != Nil) { add_property((featureptr) thisvfe, scalebbox_prop); thisvfe = thisvfe->next; } thisevf = First_obj_evf(scalebbox_obj); while (thisevf != Nil) { add_property((featureptr) thisevf, scalebbox_prop); thisevf = thisevf->next; } thisfve = First_obj_fve(scalebbox_obj); while (thisfve != Nil) { add_property((featureptr) thisfve, scalebbox_prop); thisfve = thisfve->next; } }
nomask void _F_sys_destruct() { string oname; string creator; object this; object programd; int clone; int oindex; ACCESS_CHECK(KERNEL() || SYSTEM()); this = this_object(); oname = object_name(this); clone = !!sscanf(oname, "%*s#"); if (!sscanf(oname, "%s#%d", oname, oindex)) { oindex = status(this, O_INDEX); } if (sscanf(oname, "%*s" + CLONABLE_SUBDIR) == 0 && sscanf(oname, "%*s" + LIGHTWEIGHT_SUBDIR) == 0) { destruct(); } else { destruct(clone); } creator = DRIVER->creator(oname); programd = find_object(PROGRAMD); if (programd) { object pinfo; string *dtors; string dtor; int i, sz; pinfo = PROGRAMD->query_program_info( status(this, O_INDEX) ); if (pinfo) { dtor = pinfo->query_destructor(); if (dtor) { call_other(this, dtor); } dtors = pinfo->query_inherited_destructors(); for (sz = sizeof(dtors) - 1; sz >= 0; --sz) { call_other(this, dtors[i]); } } } set_object_name(nil); clear_list(); TOUCHD->clear_patches(oindex); }