t_jit_err jit_tml_keystone_init(void) { long attrflags=0; t_jit_object *attr; t_jit_object *mop, *o; _jit_tml_keystone_class = jit_class_new("jit_tml_keystone",(method)jit_tml_keystone_new,(method)jit_tml_keystone_free, sizeof(t_jit_tml_keystone),A_CANT,0L); //A_CANT = untyped // add mop mop = jit_object_new(_jit_sym_jit_mop,2,1); // 1 matrix input / 1 matrix output // need this for getting correct matrix_info from 2nd input matrix.... (see jit.concat.c...) jit_mop_input_nolink(mop,2); o= jit_object_method(mop,_jit_sym_getinput,2); jit_object_method(o,_jit_sym_ioproc,jit_mop_ioproc_copy_adapt); jit_class_addadornment(_jit_tml_keystone_class,mop); // add methods jit_class_addmethod(_jit_tml_keystone_class, (method)jit_tml_keystone_matrix_calc, "matrix_calc", A_CANT, 0L); //Add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; attr = jit_object_new( _jit_sym_jit_attr_offset_array,"param",_jit_sym_float32, JIT_MATRIX_MAX_PLANECOUNT, attrflags,(method)0L,(method)jit_tml_keystone_param_set, calcoffset(t_jit_tml_keystone,paramcount),calcoffset(t_jit_tml_keystone,param)); jit_class_addattr(_jit_tml_keystone_class,attr); jit_class_register(_jit_tml_keystone_class); return JIT_ERR_NONE; }
t_jit_err PenizeJitInit(void) { const int kJitterInlets = 1, // One inlet for Jitter Matrices kJitterOutlets = 0; // No outlets for Jitter Matrices // The Max shell object will create outlets for // sending out the results of our calculations, but // that's none of our business. // 1) Set up Matrix Operator gPenizeJitClass = jit_class_new((char*) kMaxClassName, (method) PenizeJitNew, (method) PenizeJitFree, // ?? Could be NIL ?? sizeof(jcobPenize), A_CANT, 0L ); jit_class_addadornment( gPenizeJitClass, jit_object_new(_jit_sym_jit_mop, kJitterInlets, kJitterOutlets) ); // 2) Add methods jit_class_addmethod(gPenizeJitClass, (method) PenizeJitMCalc, "matrix_calc", A_CANT, 0L); // 3) Add attributes (if any) AddPenizeAttribute("diffs", calcoffset(jcobPenize, changeResults)); // 4) Register the class // This must happen last, after methods & attributes have been added jit_class_register(gPenizeJitClass); return JIT_ERR_NONE; }
t_jit_err jit_scissors_init(void) { long attrflags=0; void *attr, *mop; _jit_scissors_class = jit_class_new("jit_scissors", (method)jit_scissors_new, (method)jit_scissors_free, sizeof(t_jit_scissors), 0L); //add mop mop = jit_object_new(_jit_sym_jit_mop, 1, -1); //#inputs, #outputs(variable) jit_class_addadornment(_jit_scissors_class, mop); //add methods jit_class_addmethod(_jit_scissors_class, (method)jit_scissors_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; attr = jit_object_new(_jit_sym_jit_attr_offset, "rows", _jit_sym_long, attrflags, (method)0, (method)0, calcoffset(t_jit_scissors, rows)); jit_attr_addfilterset_clip(attr, 1, 16, 1, 1); jit_class_addattr(_jit_scissors_class, attr); attr = jit_object_new(_jit_sym_jit_attr_offset, "columns", _jit_sym_long, attrflags, (method)0, (method)0, calcoffset(t_jit_scissors, cols)); jit_attr_addfilterset_clip(attr, 1, 16, 1, 1); jit_class_addattr(_jit_scissors_class, attr); attrflags = JIT_ATTR_GET_OPAQUE_USER | JIT_ATTR_SET_OPAQUE_USER; attr = jit_object_new(_jit_sym_jit_attr_offset, "max", _jit_sym_long, attrflags, (method)0, (method)0, calcoffset(t_jit_scissors, max)); jit_class_addattr(_jit_scissors_class, attr); jit_class_register(_jit_scissors_class); return JIT_ERR_NONE; }
t_jit_err jit_3m_init(void) { long attrflags=0; t_jit_object *attr,*mop; _jit_3m_class = jit_class_new("jit_3m",(method)jit_3m_new,(method)jit_3m_free, sizeof(t_jit_3m),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,0); jit_class_addadornment(_jit_3m_class,mop); //add methods jit_class_addmethod(_jit_3m_class, (method)jit_3m_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_SET_OPAQUE_USER | JIT_ATTR_GET_DEFER_LOW; attr = jit_object_new(_jit_sym_jit_attr_offset_array,"min",_jit_sym_atom,JIT_MATRIX_MAX_PLANECOUNT,attrflags, (method)0L,(method)0L,calcoffset(t_jit_3m,planecount),calcoffset(t_jit_3m,min)); jit_class_addattr(_jit_3m_class,attr); attr = jit_object_new(_jit_sym_jit_attr_offset_array,"mean",_jit_sym_atom,JIT_MATRIX_MAX_PLANECOUNT,attrflags, (method)0L,(method)0L,calcoffset(t_jit_3m,planecount),calcoffset(t_jit_3m,mean)); jit_class_addattr(_jit_3m_class,attr); attr = jit_object_new(_jit_sym_jit_attr_offset_array,"max",_jit_sym_atom,JIT_MATRIX_MAX_PLANECOUNT,attrflags, (method)0L,(method)0L,calcoffset(t_jit_3m,planecount),calcoffset(t_jit_3m,max)); jit_class_addattr(_jit_3m_class,attr); jit_class_register(_jit_3m_class); return JIT_ERR_NONE; }
t_jit_err jit_findbounds_init(void) { long attrflags=0; t_jit_object *attr,*mop; _jit_findbounds_class = jit_class_new("jit_findbounds",(method)jit_findbounds_new,(method)jit_findbounds_free, sizeof(t_jit_findbounds),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,0); jit_class_addadornment(_jit_findbounds_class,mop); //add methods jit_class_addmethod(_jit_findbounds_class, (method)jit_findbounds_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; attr = jit_object_new(_jit_sym_jit_attr_offset_array,"min",_jit_sym_float64,JIT_MATRIX_MAX_PLANECOUNT,attrflags, (method)0L,(method)0L,calcoffset(t_jit_findbounds, mincount),calcoffset(t_jit_findbounds,min)); jit_class_addattr(_jit_findbounds_class,attr); attr = jit_object_new(_jit_sym_jit_attr_offset_array,"max",_jit_sym_float64,JIT_MATRIX_MAX_PLANECOUNT,attrflags, (method)0L,(method)0L,calcoffset(t_jit_findbounds, maxcount),calcoffset(t_jit_findbounds,max)); jit_class_addattr(_jit_findbounds_class,attr); attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_OPAQUE_USER; attr = jit_object_new(_jit_sym_jit_attr_offset_array,"boundmin",_jit_sym_long,JIT_MATRIX_MAX_DIMCOUNT,attrflags, (method)0L,(method)0L,calcoffset(t_jit_findbounds, boundmincount),calcoffset(t_jit_findbounds,boundmin)); jit_class_addattr(_jit_findbounds_class,attr); attr = jit_object_new(_jit_sym_jit_attr_offset_array,"boundmax",_jit_sym_long,JIT_MATRIX_MAX_DIMCOUNT,attrflags, (method)0L,(method)0L,calcoffset(t_jit_findbounds, boundmaxcount),calcoffset(t_jit_findbounds,boundmax)); jit_class_addattr(_jit_findbounds_class,attr); jit_class_register(_jit_findbounds_class); return JIT_ERR_NONE; }
t_jit_err jit_glue_init(void) { long attrflags=0; void *attr,*mop,*o; _jit_glue_class = jit_class_new("jit_glue",(method)jit_glue_new,(method)jit_glue_free, sizeof(t_jit_glue),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,-1,1); //#inputs,#outputs(variable) o = jit_object_method(mop,_jit_sym_getoutput,1); jit_attr_setlong(o,_jit_sym_dimlink,0); jit_class_addadornment(_jit_glue_class,mop); //add methods jit_class_addmethod(_jit_glue_class, (method)jit_glue_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; attr = jit_object_new(_jit_sym_jit_attr_offset,"rows",_jit_sym_long,attrflags, (method)0,(method)0,calcoffset(t_jit_glue,rows)); jit_attr_addfilterset_clip(attr,1,16,1,1); jit_class_addattr(_jit_glue_class,attr); attr = jit_object_new(_jit_sym_jit_attr_offset,"columns",_jit_sym_long,attrflags, (method)0,(method)0,calcoffset(t_jit_glue,cols)); jit_attr_addfilterset_clip(attr,1,16,1,1); jit_class_addattr(_jit_glue_class,attr); attrflags = JIT_ATTR_GET_OPAQUE_USER | JIT_ATTR_SET_OPAQUE_USER; attr = jit_object_new(_jit_sym_jit_attr_offset,"input",_jit_sym_long,attrflags, (method)0,(method)0,calcoffset(t_jit_glue,input)); jit_class_addattr(_jit_glue_class,attr); jit_class_register(_jit_glue_class); return JIT_ERR_NONE; }
t_jit_err jit_fluoride_init(void) { long attrflags=0; t_jit_object *attr, *mop; _jit_fluoride_class = jit_class_new("jit_fluoride",(method)jit_fluoride_new,(method)jit_fluoride_free, sizeof(t_jit_fluoride),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,1); //#inputs,#outputs jit_mop_single_type(mop,_jit_sym_char); jit_mop_single_planecount(mop,4); jit_class_addadornment(_jit_fluoride_class,mop); //add methods jit_class_addmethod(_jit_fluoride_class, (method)jit_fluoride_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; CLASS_STICKY_CATEGORY(_jit_fluoride_class,0,"Behavior"); CLASS_STICKY_ATTR(_jit_fluoride_class,"basic",0,"1"); // glow -- sets color for neon effect attr = jit_object_new(_jit_sym_jit_attr_offset_array, "glow", _jit_sym_float64, 3, attrflags, (method)0L, (method)0L, calcoffset(t_jit_fluoride, glowcount), calcoffset(t_jit_fluoride,glow)); jit_class_addattr(_jit_fluoride_class,attr); CLASS_ATTR_STYLE_LABEL(_jit_fluoride_class,"glow",0,"rgb","Glow Color"); // lum -- moves center luminosity attr = jit_object_new(_jit_sym_jit_attr_offset,"lum",_jit_sym_float64,attrflags, (method)0L,(method)0L,calcoffset(t_jit_fluoride,lum)); jit_class_addattr(_jit_fluoride_class,attr); CLASS_ATTR_LABEL(_jit_fluoride_class,"lum",0,"Luminosity"); // tol -- width of neon tolerance attr = jit_object_new(_jit_sym_jit_attr_offset,"tol",_jit_sym_float64,attrflags, (method)0L,(method)0L,calcoffset(t_jit_fluoride,tol)); jit_class_addattr(_jit_fluoride_class,attr); CLASS_ATTR_LABEL(_jit_fluoride_class,"tol",0,"Tolerance"); // mode -- b/w (0) or color (1) attr = jit_object_new(_jit_sym_jit_attr_offset,"mode",_jit_sym_long,attrflags, (method)0L,(method)0L,calcoffset(t_jit_fluoride,mode)); jit_class_addattr(_jit_fluoride_class,attr); CLASS_ATTR_LABEL(_jit_fluoride_class,"mode",0,"Color Mode"); CLASS_ATTR_ENUMINDEX(_jit_fluoride_class, "mode", 0, "\"Black and White\" Color"); CLASS_STICKY_CATEGORY_CLEAR(_jit_fluoride_class); CLASS_STICKY_ATTR_CLEAR(_jit_fluoride_class, "basic"); jit_class_register(_jit_fluoride_class); return JIT_ERR_NONE; }
t_jit_err jit_gl_simple_init(void) { long ob3d_flags = JIT_OB3D_NO_MATRIXOUTPUT; // no matrix output void *ob3d; _jit_gl_simple_class = jit_class_new("jit_gl_simple", (method)jit_gl_simple_new, (method)jit_gl_simple_free, sizeof(t_jit_gl_simple),A_DEFSYM,0L); // set up object extension for 3d object, customized with flags ob3d = jit_ob3d_setup(_jit_gl_simple_class, calcoffset(t_jit_gl_simple, ob3d), ob3d_flags); // define our OB3D draw method. called in automatic mode by // jit.gl.render or otherwise through ob3d when banged. this // method is A_CANT because our draw setup needs to happen // in the ob3d beforehand to initialize OpenGL state jit_class_addmethod(_jit_gl_simple_class, (method)jit_gl_simple_draw, "ob3d_draw", A_CANT, 0L); // define our dest_closing and dest_changed methods. // these methods are called by jit.gl.render when the // destination context closes or changes: for example, when // the user moves the window from one monitor to another. Any // resources your object keeps in the OpenGL machine // (e.g. textures, display lists, vertex shaders, etc.) // will need to be freed when closing, and rebuilt when it has // changed. In this object, these functions do nothing, and // could be omitted. jit_class_addmethod(_jit_gl_simple_class, (method)jit_gl_simple_dest_closing, "dest_closing", A_CANT, 0L); jit_class_addmethod(_jit_gl_simple_class, (method)jit_gl_simple_dest_changed, "dest_changed", A_CANT, 0L); // must register for ob3d use jit_class_addmethod(_jit_gl_simple_class, (method)jit_object_register, "register", A_CANT, 0L); jit_class_register(_jit_gl_simple_class); return JIT_ERR_NONE; }
t_jit_err cv_jit_lines_init(void) { long attrflags=0; t_jit_object *attr,*mop,*output; _cv_jit_lines_class = jit_class_new("cv_jit_lines",(method)cv_jit_lines_new,(method)cv_jit_lines_free, sizeof(t_cv_jit_lines),0L); //add mop mop = (t_jit_object *)jit_object_new(_jit_sym_jit_mop,1,1); //Object has one input and one output jit_mop_single_type(mop,_jit_sym_char); //Set input type and planecount jit_mop_single_planecount(mop,1); jit_mop_output_nolink(mop,1); //Turn off output linking so that output matrix does not adapt to input output = (t_jit_object *)jit_object_method(mop,_jit_sym_getoutput,1); //Get a pointer to the output matrix jit_attr_setlong(output,_jit_sym_minplanecount,4); //Set output plane count jit_attr_setlong(output,_jit_sym_maxplanecount,4); //4 -> Coordinates of start and end points for each line jit_attr_setlong(output,_jit_sym_mindim,1); //Only one dimension jit_attr_setlong(output,_jit_sym_maxdim,1); jit_attr_setsym(output,_jit_sym_types,_jit_sym_long); jit_class_addadornment(_cv_jit_lines_class,mop); //add methods jit_class_addmethod(_cv_jit_lines_class, (method)cv_jit_lines_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attr = (t_jit_object *)jit_object_new(_jit_sym_jit_attr_offset,"threshold",_jit_sym_float64,attrflags, (method)0L,(method)0L,calcoffset(t_cv_jit_lines,threshold)); jit_attr_addfilterset_clip(attr,1,255,TRUE,TRUE); //clip to 1-255 jit_class_addattr(_cv_jit_lines_class,attr); attr = (t_jit_object *)jit_object_new(_jit_sym_jit_attr_offset,"resolution",_jit_sym_long,attrflags, (method)0L,(method)0L,calcoffset(t_cv_jit_lines,resolution)); jit_attr_addfilterset_clip(attr,1,10,TRUE,TRUE); //clip to 1-10 jit_class_addattr(_cv_jit_lines_class,attr); attr = (t_jit_object *)jit_object_new(_jit_sym_jit_attr_offset,"gap",_jit_sym_float64,attrflags, (method)0L,(method)0L,calcoffset(t_cv_jit_lines,gap)); jit_class_addattr(_cv_jit_lines_class,attr); attr = (t_jit_object *)jit_object_new(_jit_sym_jit_attr_offset,"length",_jit_sym_float64,attrflags, (method)0L,(method)0L,calcoffset(t_cv_jit_lines,length)); jit_class_addattr(_cv_jit_lines_class,attr); attr = (t_jit_object *)jit_object_new(_jit_sym_jit_attr_offset,"sensitivity",_jit_sym_long,attrflags, (method)0L,(method)0L,calcoffset(t_cv_jit_lines,sensitivity)); jit_attr_addfilterset_clip(attr,1,255,TRUE,TRUE); //clip to 1-255 jit_class_addattr(_cv_jit_lines_class,attr); jit_class_register(_cv_jit_lines_class); return JIT_ERR_NONE; }
t_jit_err jit_tml_vp8_encode_init(void) { long attrflags=0; t_jit_object *attr; t_jit_object *mop, *o; //Create class with given constructors & destructors _jit_tml_vp8_encode_class = jit_class_new("jit_tml_vp8_encode",(method)jit_tml_vp8_encode_new,(method)jit_tml_vp8_encode_free, sizeof(t_jit_tml_vp8_encode),A_CANT,0L); //A_CANT = untyped // 0 matrix input / 4 matrix output mop = (t_jit_object*)jit_object_new(_jit_sym_jit_mop,1,1); // need this for getting correct matrix_info from 2nd input matrix.... (see jit.concat.c...) //jit_mop_input_nolink(mop,2); // o= (t_jit_object*)jit_object_method(mop,_jit_sym_getinput,2); //jit_object_method(o,_jit_sym_ioproc,jit_mop_ioproc_copy_adapt); jit_class_addadornment(_jit_tml_vp8_encode_class,mop); // add methods jit_class_addmethod(_jit_tml_vp8_encode_class, (method)jit_tml_vp8_encode_matrix_calc, "matrix_calc", A_CANT, 0L); jit_class_addmethod(_jit_tml_vp8_encode_class, (method)jit_tml_vp8_encode_open, "open", A_DEFLONG, 0L); attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; attr = (t_jit_object*)jit_object_new(_jit_sym_jit_attr_offset, "kilobitrate", _jit_sym_long, attrflags, (method)0L, (method)jit_tml_vp8_encode_setBitrate, calcoffset(t_jit_tml_vp8_encode, bitRate)); jit_class_addattr(_jit_tml_vp8_encode_class, attr); //Done! jit_class_register(_jit_tml_vp8_encode_class); return JIT_ERR_NONE; }
t_jit_err xray_jit_fdm_init(void) { long attrflags=0; t_jit_object *attr,*mop,*o; t_symbol *atsym; t_atom a[1]; atsym = gensym("jit_attr_offset"); _xray_jit_fdm_class = jit_class_new("xray_jit_fdm",(method)xray_jit_fdm_new,(method)xray_jit_fdm_free, sizeof(t_xray_jit_fdm),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,1); jit_mop_single_planecount(mop,1); jit_atom_setsym(a,_jit_sym_float32); o = jit_object_method(mop,_jit_sym_getoutput,1); jit_object_method(o,_jit_sym_types,1,a); jit_class_addadornment(_xray_jit_fdm_class,mop); //add methods jit_class_addmethod(_xray_jit_fdm_class, (method)xray_jit_fdm_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; //spacestep attr = jit_object_new(atsym,"spacestep",_jit_sym_float32,attrflags, (method)0L,(method)0L,calcoffset(t_xray_jit_fdm,spacestep)); jit_class_addattr(_xray_jit_fdm_class,attr); //direction attr = jit_object_new(_jit_sym_jit_attr_offset,"direction",_jit_sym_symbol,attrflags, (method)0L,(method)0L,calcoffset(t_xray_jit_fdm, direction)); jit_class_addattr(_xray_jit_fdm_class,attr); //generate symbols ps_x = gensym("x"); ps_y = gensym("y"); ps_xx = gensym("xx"); ps_xy = gensym("xy"); ps_yx = gensym("yx"); ps_yy = gensym("yy"); jit_class_register(_xray_jit_fdm_class); return JIT_ERR_NONE; }
t_jit_err jit_gradient_init(void) { long attrflags=0; t_jit_object *attr; t_jit_object *mop; _jit_gradient_class = jit_class_new("jit_gradient",(method)jit_gradient_new,(method)jit_gradient_free, sizeof(t_jit_gradient),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,1); jit_mop_single_type(mop, _jit_sym_char); jit_mop_single_planecount(mop, 4); jit_class_addadornment(_jit_gradient_class,mop); //add methods jit_class_addmethod(_jit_gradient_class, (method)jit_gradient_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; CLASS_STICKY_CATEGORY(_jit_gradient_class,0,"Behavior"); CLASS_STICKY_ATTR(_jit_gradient_class,"basic",0,"1"); // start - beginning gradient cell attr = jit_object_new(_jit_sym_jit_attr_offset_array, "start", _jit_sym_float64, 4, attrflags, (method)0L, (method)0L, calcoffset(t_jit_gradient, startcount), calcoffset(t_jit_gradient,start)); jit_class_addattr(_jit_gradient_class,attr); CLASS_ATTR_LABEL(_jit_gradient_class,"start",0,"Start"); attr = jit_object_new(_jit_sym_jit_attr_offset_array, "end", _jit_sym_float64, 4, attrflags, (method)0L, (method)0L, calcoffset(t_jit_gradient, endcount), calcoffset(t_jit_gradient,end)); jit_class_addattr(_jit_gradient_class,attr); CLASS_ATTR_LABEL(_jit_gradient_class,"end",0,"End"); attr = jit_object_new(_jit_sym_jit_attr_offset_array, "cheby", _jit_sym_float64, 64, attrflags, (method)0L, (method)0L, calcoffset(t_jit_gradient, chebycount), calcoffset(t_jit_gradient,cheby)); jit_class_addattr(_jit_gradient_class,attr); CLASS_ATTR_LABEL(_jit_gradient_class,"cheby",0,"Chebyshev Coefficients"); CLASS_STICKY_CATEGORY_CLEAR(_jit_gradient_class); CLASS_STICKY_ATTR_CLEAR(_jit_gradient_class, "basic"); jit_class_register(_jit_gradient_class); return JIT_ERR_NONE; }
t_jit_err jit_SDIF_buffer_init(void) { void *mop; _jit_SDIF_buffer_class = jit_class_new("jit_SDIF_buffer",(method)jit_SDIF_buffer_new,(method)jit_SDIF_buffer_free, sizeof(t_jit_SDIF_buffer),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,0,1); jit_class_addadornment(_jit_SDIF_buffer_class,mop); //add methods jit_class_addmethod(_jit_SDIF_buffer_class, (method)jit_SDIF_buffer_matrix_calc, "matrix_calc", A_CANT, 0L); jit_class_register(_jit_SDIF_buffer_class); return JIT_ERR_NONE; }
t_jit_err cv_jit_blobs_direction_init(void) { long attrflags=0; t_jit_object *attr,*mop,*output; t_symbol *atsym; atsym = gensym("jit_attr_offset"); _cv_jit_blobs_direction_class = jit_class_new("cv_jit_blobs_direction",(method)cv_jit_blobs_direction_new,(method)cv_jit_blobs_direction_free, sizeof(t_cv_jit_blobs_direction),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,1); //Object has one input and one output jit_mop_single_type(mop,_jit_sym_float32); //Set input type and planecount jit_mop_single_planecount(mop,17); jit_mop_output_nolink(mop,1); //Turn off output linking so that output matrix does not adapt to input output = jit_object_method(mop,_jit_sym_getoutput,1); //Get a pointer to the output matrix jit_attr_setlong(output,_jit_sym_minplanecount,1); jit_attr_setlong(output,_jit_sym_maxplanecount,1); jit_attr_setlong(output,_jit_sym_mindim,1); jit_attr_setlong(output,_jit_sym_maxdim,1); jit_attr_setsym(output,_jit_sym_types,_jit_sym_float32); jit_class_addadornment(_cv_jit_blobs_direction_class,mop); //add methods jit_class_addmethod(_cv_jit_blobs_direction_class, (method)cv_jit_blobs_direction_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; attr = jit_object_new(_jit_sym_jit_attr_offset,"mode",_jit_sym_long,attrflags, (method)0L,(method)0L,calcoffset(t_cv_jit_blobs_direction,mode)); jit_attr_addfilterset_clip(attr,0,1,TRUE,TRUE); //clip to 0-1 jit_class_addattr(_cv_jit_blobs_direction_class,attr); attr = jit_object_new(_jit_sym_jit_attr_offset,"flip",_jit_sym_long,attrflags, (method)0L,(method)0L,calcoffset(t_cv_jit_blobs_direction,flip)); jit_attr_addfilterset_clip(attr,0,1,TRUE,TRUE); //clip to 0-1 jit_class_addattr(_cv_jit_blobs_direction_class,attr); jit_class_register(_cv_jit_blobs_direction_class); return JIT_ERR_NONE; }
t_jit_err jit_change_init(void) { long attrflags=0; t_jit_object *attr; t_jit_object *mop; _jit_change_class = jit_class_new("jit_change",(method)jit_change_new,(method)jit_change_free, sizeof(t_jit_change),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,1); jit_class_addadornment(_jit_change_class,mop); //add methods jit_class_addmethod(_jit_change_class, (method)jit_change_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; CLASS_STICKY_CATEGORY(_jit_change_class,0,"Behavior"); CLASS_STICKY_ATTR(_jit_change_class,"basic",0,"1"); attr = jit_object_new(_jit_sym_jit_attr_offset,"thresh",_jit_sym_long,attrflags, (method)0L,(method)0L,calcoffset(t_jit_change,thresh)); jit_class_addattr(_jit_change_class,attr); CLASS_ATTR_LABEL(_jit_change_class,"thresh",0,"Threshold"); attr = jit_object_new(_jit_sym_jit_attr_offset,"mode",_jit_sym_char,attrflags, (method)0L,(method)0L,calcoffset(t_jit_change,mode)); jit_class_addattr(_jit_change_class,attr); CLASS_ATTR_LABEL(_jit_change_class,"mode",0,"Pass Mode"); CLASS_ATTR_ENUMINDEX2(_jit_change_class, "mode", 0, "More-Than-Threshold", "Less-Than-Threshold"); CLASS_STICKY_CATEGORY_CLEAR(_jit_change_class); CLASS_STICKY_ATTR_CLEAR(_jit_change_class, "basic"); attrflags = JIT_ATTR_GET_OPAQUE_USER | JIT_ATTR_SET_OPAQUE_USER; attr = jit_object_new(_jit_sym_jit_attr_offset,"change",_jit_sym_long,attrflags, (method)0L,(method)0L,calcoffset(t_jit_change,change)); jit_class_addattr(_jit_change_class,attr); jit_class_register(_jit_change_class); // ps_change = gensym("change"); return JIT_ERR_NONE; }
t_jit_err jit_fluoride_init(void) { long attrflags=0; t_jit_object *attr, *mop; _jit_fluoride_class = jit_class_new("jit_fluoride",(method)jit_fluoride_new,(method)jit_fluoride_free, sizeof(t_jit_fluoride),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,1); //#inputs,#outputs jit_mop_single_type(mop,_jit_sym_char); jit_mop_single_planecount(mop,4); jit_class_addadornment(_jit_fluoride_class,mop); //add methods jit_class_addmethod(_jit_fluoride_class, (method)jit_fluoride_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; // glow -- sets color for neon effect attr = jit_object_new(_jit_sym_jit_attr_offset_array, "glow", _jit_sym_float64, 3, attrflags, (method)0L, (method)0L, calcoffset(t_jit_fluoride, glowcount), calcoffset(t_jit_fluoride,glow)); jit_class_addattr(_jit_fluoride_class,attr); // lum -- moves center luminosity attr = jit_object_new(_jit_sym_jit_attr_offset,"lum",_jit_sym_float64,attrflags, (method)0L,(method)0L,calcoffset(t_jit_fluoride,lum)); jit_class_addattr(_jit_fluoride_class,attr); // tol -- width of neon tolerance attr = jit_object_new(_jit_sym_jit_attr_offset,"tol",_jit_sym_float64,attrflags, (method)0L,(method)0L,calcoffset(t_jit_fluoride,tol)); jit_class_addattr(_jit_fluoride_class,attr); // mode -- b/w (0) or color (1) attr = jit_object_new(_jit_sym_jit_attr_offset,"mode",_jit_sym_long,attrflags, (method)0L,(method)0L,calcoffset(t_jit_fluoride,mode)); jit_class_addattr(_jit_fluoride_class,attr); jit_class_register(_jit_fluoride_class); return JIT_ERR_NONE; }
t_jit_err jit_rgb2luma_init(void) { long attrflags=0; t_jit_object *attr, *mop, *o; _jit_rgb2luma_class = jit_class_new("jit_rgb2luma",(method)jit_rgb2luma_new,(method)jit_rgb2luma_free, sizeof(t_jit_rgb2luma),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,1); //#inputs,#outputs jit_mop_single_planecount(mop, 1); jit_mop_single_type(mop, _jit_sym_char); o=jit_object_method(mop,_jit_sym_getoutput,1); jit_attr_setlong(o,_jit_sym_planelink,0); jit_class_addadornment(_jit_rgb2luma_class,mop); //add methods jit_class_addmethod(_jit_rgb2luma_class, (method)jit_rgb2luma_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; attr = jit_object_new(_jit_sym_jit_attr_offset,"ascale",_jit_sym_float64,attrflags, (method)0L,(method)0L,calcoffset(t_jit_rgb2luma,ascale)); jit_class_addattr(_jit_rgb2luma_class,attr); object_addattr_parse(attr,"label",_jit_sym_symbol,0,"\"Alpha Scale\""); attr = jit_object_new(_jit_sym_jit_attr_offset,"rscale",_jit_sym_float64,attrflags, (method)0L,(method)0L,calcoffset(t_jit_rgb2luma,rscale)); jit_class_addattr(_jit_rgb2luma_class,attr); object_addattr_parse(attr,"label",_jit_sym_symbol,0,"\"Red Scale\""); attr = jit_object_new(_jit_sym_jit_attr_offset,"gscale",_jit_sym_float64,attrflags, (method)0L,(method)0L,calcoffset(t_jit_rgb2luma,gscale)); jit_class_addattr(_jit_rgb2luma_class,attr); object_addattr_parse(attr,"label",_jit_sym_symbol,0,"\"Green Scale\""); attr = jit_object_new(_jit_sym_jit_attr_offset,"bscale",_jit_sym_float64,attrflags, (method)0L,(method)0L,calcoffset(t_jit_rgb2luma,bscale)); jit_class_addattr(_jit_rgb2luma_class,attr); object_addattr_parse(attr,"label",_jit_sym_symbol,0,"\"Blue Scale\""); jit_class_register(_jit_rgb2luma_class); return JIT_ERR_NONE; }
t_jit_err jit_realsense_grab_init(void) { t_jit_object *mop; s_jit_realsense_grab_class = jit_class_new("jit_realsense_grab", (method)jit_realsense_grab_new, (method)jit_realsense_grab_free, sizeof(t_jit_realsense_grab), 0); // add matrix operator (mop) mop = (t_jit_object*)jit_object_new(_jit_sym_jit_mop, 0, 1); // args are num inputs and num outputs jit_class_addadornment(s_jit_realsense_grab_class, mop); // add method(s) jit_class_addmethod(s_jit_realsense_grab_class, (method)jit_realsense_grab_matrix_calc, "matrix_calc", A_CANT, 0); // finalize class jit_class_register(s_jit_realsense_grab_class); return JIT_ERR_NONE; }
t_jit_err xray_jit_crossproduct_init(void) { long attrflags=0; t_jit_object *attr,*mop; t_symbol *atsym; void *o; t_atom a[2]; atsym = gensym("jit_attr_offset"); _xray_jit_crossproduct_class = jit_class_new("xray_jit_crossproduct",(method)xray_jit_crossproduct_new,(method)xray_jit_crossproduct_free, sizeof(t_xray_jit_crossproduct),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,2,1); jit_atom_setsym(a, _jit_sym_float32); jit_atom_setsym(a+1, _jit_sym_float64); o = jit_object_method(mop,_jit_sym_getinput,1); jit_object_method(o,_jit_sym_types,2,a); o = jit_object_method(mop,_jit_sym_getinput,2); jit_object_method(o,_jit_sym_types,2,a); o = jit_object_method(mop,_jit_sym_getoutput,1); jit_object_method(o,_jit_sym_types,2,a); jit_class_addadornment(_xray_jit_crossproduct_class,mop); //add methods jit_class_addmethod(_xray_jit_crossproduct_class, (method)xray_jit_crossproduct_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; //normalize attr = jit_object_new(_jit_sym_jit_attr_offset_array,"normalize",_jit_sym_char,2,attrflags, (method)0L,(method)0L,calcoffset(t_xray_jit_crossproduct,normalizecount),calcoffset(t_xray_jit_crossproduct,normalize)); jit_class_addattr(_xray_jit_crossproduct_class,attr); jit_class_register(_xray_jit_crossproduct_class); return JIT_ERR_NONE; }
t_jit_err jit_dimmap_init(void) { long attrflags=0; t_jit_object *attr,*mop,*o; t_symbol *atsym; atsym = gensym("jit_attr_offset"); _jit_dimmap_class = jit_class_new("jit_dimmap",(method)jit_dimmap_new,(method)jit_dimmap_free, sizeof(t_jit_dimmap),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,1); jit_mop_output_nolink(mop,1); jit_class_addadornment(_jit_dimmap_class,mop); o = jit_object_method(mop,_jit_sym_getoutput,1); //add methods jit_class_addmethod(_jit_dimmap_class, (method)jit_dimmap_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; CLASS_STICKY_ATTR(_jit_dimmap_class,"category",0,"Behavior"); CLASS_STICKY_ATTR(_jit_dimmap_class,"basic",0,"1"); attr = jit_object_new(_jit_sym_jit_attr_offset_array,"map",_jit_sym_long,JIT_MATRIX_MAX_DIMCOUNT,attrflags, (method)0L,(method)jit_dimmap_map,calcoffset(t_jit_dimmap,mapcount),calcoffset(t_jit_dimmap,map)); jit_class_addattr(_jit_dimmap_class,attr); CLASS_ATTR_LABEL(_jit_dimmap_class,"map",0,"Dimension Map"); attr = jit_object_new(_jit_sym_jit_attr_offset_array,"invert",_jit_sym_long,JIT_MATRIX_MAX_DIMCOUNT,attrflags, (method)0L,(method)0L,calcoffset(t_jit_dimmap,invertcount),calcoffset(t_jit_dimmap,invert)); jit_class_addattr(_jit_dimmap_class,attr); CLASS_ATTR_LABEL(_jit_dimmap_class,"invert",0,"Dimension Invert"); CLASS_STICKY_ATTR_CLEAR(_jit_dimmap_class, "basic"); CLASS_STICKY_ATTR_CLEAR(_jit_dimmap_class, "category"); jit_class_register(_jit_dimmap_class); return JIT_ERR_NONE; }
t_jit_err jit_alphablend_init(void) { long attrflags=0; t_jit_object *attr,*mop,*o; t_symbol *atsym; t_atom a[3]; atsym = gensym("jit_attr_offset"); _jit_alphablend_class = jit_class_new("jit_alphablend",(method)jit_alphablend_new,(method)jit_alphablend_free, sizeof(t_jit_alphablend),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,2,1); // jit_mop_single_planecount(mop,4); jit_atom_setsym(a,_jit_sym_char); jit_atom_setsym(a+1,_jit_sym_float32); jit_atom_setsym(a+2,_jit_sym_float64); o = jit_object_method(mop,_jit_sym_getinput,2); jit_object_method(o,_jit_sym_types,3,a); o = jit_object_method(mop,_jit_sym_getoutput,1); jit_object_method(o,_jit_sym_types,3,a); jit_class_addadornment(_jit_alphablend_class,mop); //add methods jit_class_addmethod(_jit_alphablend_class, (method)jit_alphablend_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; attr = jit_object_new(atsym,"mode",_jit_sym_long,attrflags, (method)0L,(method)0L,calcoffset(t_jit_alphablend,mode)); jit_class_addattr(_jit_alphablend_class,attr); CLASS_ATTR_BASIC(_jit_alphablend_class,"mode",0); CLASS_ATTR_LABEL(_jit_alphablend_class,"mode",0,"Crossfade Mode"); CLASS_ATTR_ENUMINDEX2(_jit_alphablend_class, "mode", 0, "Left-to-Right", "Right-to-Left"); CLASS_ATTR_CATEGORY(_jit_alphablend_class, "mode", 0, "Mode"); jit_class_register(_jit_alphablend_class); return JIT_ERR_NONE; }
t_jit_err cv_jit_blobs_centroids_init(void) { t_jit_object *mop,*output; t_symbol *atsym; atsym = gensym("jit_attr_offset"); _cv_jit_blobs_centroids_class = jit_class_new("cv_jit_blobs_centroids",(method)cv_jit_blobs_centroids_new,(method)cv_jit_blobs_centroids_free, sizeof(t_cv_jit_blobs_centroids),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,1); //Object has one input and one output output = jit_object_method(mop,_jit_sym_getoutput,1); //Get a pointer to the output matrix jit_mop_single_type(mop,_jit_sym_char); //Set input type and planecount jit_mop_single_planecount(mop,1); jit_mop_output_nolink(mop,1); //Turn off output linking so that output matrix does not adapt to input jit_attr_setlong(output,_jit_sym_minplanecount,3); //Output has 3 planes: centroid coordinates + mass jit_attr_setlong(output,_jit_sym_maxplanecount,3); jit_attr_setlong(output,_jit_sym_mindim,1); jit_attr_setlong(output,_jit_sym_maxdim,1); jit_attr_setsym(output,_jit_sym_types,_jit_sym_float32); jit_class_addadornment(_cv_jit_blobs_centroids_class,mop); //add methods jit_class_addmethod(_cv_jit_blobs_centroids_class, (method)cv_jit_blobs_centroids_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes /*No attributes for this object*/ jit_class_register(_cv_jit_blobs_centroids_class); return JIT_ERR_NONE; }
t_jit_err xray_jit_cumsum_init(void) { long attrflags=0; t_jit_object *attr,*mop,*o; t_symbol *atsym; t_atom a[1]; atsym = gensym("jit_attr_offset"); _xray_jit_cumsum_class = jit_class_new("xray_jit_cumsum",(method)xray_jit_cumsum_new,(method)xray_jit_cumsum_free, sizeof(t_xray_jit_cumsum),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop, 1, 1); jit_atom_setsym(a, _jit_sym_float32); o = jit_object_method(mop,_jit_sym_getinput,1); jit_object_method(o,_jit_sym_types,1,a); o = jit_object_method(mop,_jit_sym_getoutput,1); jit_object_method(o,_jit_sym_types,1,a); jit_class_addadornment(_xray_jit_cumsum_class,mop); //add methods jit_class_addmethod(_xray_jit_cumsum_class, (method)xray_jit_cumsum_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; //dimmode attr = jit_object_new(atsym,"dimmode",_jit_sym_char,attrflags, (method)0L,(method)0L,calcoffset(t_xray_jit_cumsum,dimmode)); jit_class_addattr(_xray_jit_cumsum_class,attr); jit_class_register(_xray_jit_cumsum_class); return JIT_ERR_NONE; }
t_jit_err jit_demultiplex_init(void) { long attrflags=0; t_jit_object *attr; t_jit_object *mop, *o; _jit_demultiplex_class = jit_class_new("jit_demultiplex",(method)jit_demultiplex_new,(method)jit_demultiplex_free, sizeof(t_jit_demultiplex),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,2); jit_mop_output_nolink(mop,1); jit_mop_output_nolink(mop,2); jit_class_addadornment(_jit_demultiplex_class,mop); //add methods jit_class_addmethod(_jit_demultiplex_class, (method)jit_demultiplex_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; attr = jit_object_new(_jit_sym_jit_attr_offset,"demultiplexdim",_jit_sym_char,attrflags, (method)0L,(method)0L,calcoffset(t_jit_demultiplex,demultiplexdim)); jit_class_addattr(_jit_demultiplex_class,attr); attr = jit_object_new(_jit_sym_jit_attr_offset,"autoclear",_jit_sym_char,attrflags, (method)0L,(method)0L,calcoffset(t_jit_demultiplex,autoclear)); jit_class_addattr(_jit_demultiplex_class,attr); attr = jit_object_new(_jit_sym_jit_attr_offset,"scan_a",_jit_sym_long,attrflags, (method)0L,(method)0L,calcoffset(t_jit_demultiplex,scan_a)); jit_class_addattr(_jit_demultiplex_class,attr); attr = jit_object_new(_jit_sym_jit_attr_offset,"scan_b",_jit_sym_long,attrflags, (method)0L,(method)0L,calcoffset(t_jit_demultiplex,scan_b)); jit_class_addattr(_jit_demultiplex_class,attr); //add methods jit_class_register(_jit_demultiplex_class); return JIT_ERR_NONE; }
t_jit_err xray_jit_colormap_init(void) { long attrflags=0; t_jit_object *attr,*mop,*o; t_symbol *atsym; t_atom a[2]; atsym = gensym("jit_attr_offset"); _xray_jit_colormap_class = jit_class_new("xray_jit_colormap",(method)xray_jit_colormap_new,(method)xray_jit_colormap_free, sizeof(t_xray_jit_colormap),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,1); jit_mop_single_planecount(mop,1); jit_atom_setsym(a,_jit_sym_char); jit_atom_setsym(a+1,_jit_sym_long); o = jit_object_method(mop,_jit_sym_getoutput,1); jit_object_method(o,_jit_sym_types,2,a); jit_class_addadornment(_xray_jit_colormap_class,mop); //add methods jit_class_addmethod(_xray_jit_colormap_class, (method)xray_jit_colormap_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; //mode attr = jit_object_new(atsym,"mode",_jit_sym_char,attrflags, (method)0L,(method)0L,calcoffset(t_xray_jit_colormap,mode)); jit_class_addattr(_xray_jit_colormap_class,attr); jit_class_register(_xray_jit_colormap_class); return JIT_ERR_NONE; }
t_jit_err StencilClassInit(void) { long attrflags = 0;// = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; t_jit_object *attr; t_jit_object *mop; sStencilClass = (ClassPtr)jit_class_new((char*)"jcom_stencil", (method)StencilNew, (method)StencilFree, sizeof(StencilObject), 0); // add matrix operator (mop) mop = (t_jit_object*)jit_object_new(_jit_sym_jit_mop, 1, 1); // args are num inputs and num outputs jit_class_addadornment(sStencilClass, mop); // add method(s) jit_class_addmethod(sStencilClass, (method)StencilMatrixCalc, (char*)"matrix_calc", A_CANT, 0); // add attribute(s) attr = (t_jit_object*)jit_object_new(_jit_sym_jit_attr_offset_array, "stepSize", _jit_sym_long, JIT_MATRIX_MAX_PLANECOUNT, attrflags, (method)StencilGetStepSize, (method)StencilSetStepSize, NULL, NULL); jit_class_addattr(sStencilClass, attr); attr = (t_jit_object*)jit_object_new(_jit_sym_jit_attr_offset, "edges", _jit_sym_symbol, attrflags, (method)StencilGetEdges, (method)StencilSetEdges, NULL); jit_class_addattr(sStencilClass, attr); // finalize class jit_class_register(sStencilClass); return JIT_ERR_NONE; }
t_jit_err cv_jit_mass_init(void) { long attrflags=0; t_jit_object *attr,*mop; _cv_jit_mass_class = jit_class_new("cv_jit_mass",(method)cv_jit_mass_new,(method)cv_jit_mass_free, sizeof(t_cv_jit_mass),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,0); jit_class_addadornment(_cv_jit_mass_class,mop); //add methods jit_class_addmethod(_cv_jit_mass_class, (method)cv_jit_mass_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_SET_OPAQUE_USER | JIT_ATTR_GET_OPAQUE_USER; attr = jit_object_new(_jit_sym_jit_attr_offset_array,"Mass",_jit_sym_atom,JIT_MATRIX_MAX_PLANECOUNT,attrflags, (method)0L,(method)0L,calcoffset(t_cv_jit_mass,planecount),calcoffset(t_cv_jit_mass,Mass)); jit_class_addattr(_cv_jit_mass_class,attr); jit_class_register(_cv_jit_mass_class); return JIT_ERR_NONE; }
t_jit_err jit_thin_init(void) { long attrflags=0; t_jit_object *attr,*mop,*o; t_symbol *atsym; atsym = gensym("jit_attr_offset"); _jit_thin_class = jit_class_new("jit_thin",(method)jit_thin_new,(method)jit_thin_free, sizeof(t_jit_thin),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,1); jit_mop_output_nolink(mop,1); jit_class_addadornment(_jit_thin_class,mop); o = jit_object_method(mop,_jit_sym_getoutput,1); //add methods jit_class_addmethod(_jit_thin_class, (method)jit_thin_matrix_calc, "matrix_calc", A_CANT, 0L); jit_class_register(_jit_thin_class); return JIT_ERR_NONE; }
t_jit_err jit_charmap_init(void) { t_atom a; void *o,*mop; _jit_charmap_class = jit_class_new("jit_charmap",(method)jit_charmap_new,(method)jit_charmap_free, sizeof(t_jit_charmap),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,2,1); jit_mop_single_type(mop,_jit_sym_char); o = jit_object_method(mop,_jit_sym_getinput,2); jit_attr_setlong(o,_jit_sym_dimlink,0); jit_atom_setlong(&a,256); jit_object_method(o,_jit_sym_mindim,1,&a); jit_object_method(o,_jit_sym_maxdim,1,&a); jit_class_addadornment(_jit_charmap_class,mop); //add methods jit_class_addmethod(_jit_charmap_class, (method)jit_charmap_matrix_calc, "matrix_calc", A_CANT, 0L); jit_class_register(_jit_charmap_class); return JIT_ERR_NONE; }
t_jit_err xray_jit_cellcoords_init(void) { long attrflags=0; t_jit_object *attr; t_jit_object *mop, *o; _xray_jit_cellcoords_class = jit_class_new("xray_jit_cellcoords",(method)xray_jit_cellcoords_new,(method)xray_jit_cellcoords_free, sizeof(t_xray_jit_cellcoords),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,1,1); o = jit_object_method(mop,_jit_sym_getoutput,1); jit_attr_setlong(o,_jit_sym_dimlink,0); jit_class_addadornment(_xray_jit_cellcoords_class,mop); //add methods jit_class_addmethod(_xray_jit_cellcoords_class, (method)xray_jit_cellcoords_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; //plane attr = jit_object_new(_jit_sym_jit_attr_offset,"plane",_jit_sym_char,attrflags, (method)0L,(method)0L,calcoffset(t_xray_jit_cellcoords,plane)); jit_class_addattr(_xray_jit_cellcoords_class,attr); //out_mode attr = jit_object_new(_jit_sym_jit_attr_offset,"out_mode",_jit_sym_char,attrflags, (method)0L,(method)0L,calcoffset(t_xray_jit_cellcoords,out_mode)); jit_class_addattr(_xray_jit_cellcoords_class,attr); jit_class_register(_xray_jit_cellcoords_class); return JIT_ERR_NONE; }