// ------- Properties list ------------------------------- // static JSPropertySpec ChLocalOptimizer_props[] = { {"max_iters", 0, JSPROP_ENUMERATE}, {"max_evaluations", 1, JSPROP_ENUMERATE}, {"tol_arg", 2, JSPROP_ENUMERATE}, {"tol_fx", 3, JSPROP_ENUMERATE}, {"initial_step", 4, JSPROP_ENUMERATE}, {"grad_step", 5, JSPROP_ENUMERATE}, {0} }; GET_JS_PARSE_BEGIN(ChLocalOptimizer_get, ChOptimizerLocal*) GET_JS_PROP (0, chjs_from_int(cx,vp,this_data->maxiters) ) GET_JS_PROP (1, chjs_from_int(cx,vp,this_data->maxevaluations) ) GET_JS_PROP (2, chjs_from_double(cx,vp,this_data->arg_tol) ) GET_JS_PROP (3, chjs_from_double(cx,vp,this_data->fun_tol) ) GET_JS_PROP (4, chjs_from_double(cx,vp,this_data->initial_step) ) GET_JS_PROP (5, chjs_from_double(cx,vp,this_data->grad_step) ) GET_JS_PARSE_END SET_JS_PARSE_BEGIN(ChLocalOptimizer_set, ChOptimizerLocal*) SET_JS_PROP (0, &chjs_int, this_data->maxiters =chjs_to_int(cx,vp) ) SET_JS_PROP (1, &chjs_int, this_data->maxevaluations =chjs_to_int(cx,vp) ) SET_JS_PROP (2, &chjs_double, this_data->arg_tol =chjs_to_double(cx,vp) ) SET_JS_PROP (3, &chjs_double, this_data->fun_tol =chjs_to_double(cx,vp) ) SET_JS_PROP (4, &chjs_double, this_data->initial_step = chjs_to_double(cx,vp) ) SET_JS_PROP (5, &chjs_double, this_data->grad_step = chjs_to_double(cx,vp) ) SET_JS_PARSE_END
// // PROPERTIES // // ------- Properties list ------------------------------- // static JSPropertySpec Quaternion_props[] = { {"e0", 0, JSPROP_ENUMERATE}, {"e1", 1, JSPROP_ENUMERATE}, {"e2", 2, JSPROP_ENUMERATE}, {"e3", 3, JSPROP_ENUMERATE}, {0} }; GET_JS_PARSE_BEGIN(Quaternion_get, Quaternion*) GET_JS_PROP (0, chjs_from_double(cx,vp,this_data->e0) ) GET_JS_PROP (1, chjs_from_double(cx,vp,this_data->e1) ) GET_JS_PROP (2, chjs_from_double(cx,vp,this_data->e2) ) GET_JS_PROP (3, chjs_from_double(cx,vp,this_data->e3) ) GET_JS_PARSE_END SET_JS_PARSE_BEGIN(Quaternion_set, Quaternion*) SET_JS_PROP (0, &chjs_double, this_data->e0 = chjs_to_double(cx,vp) ) SET_JS_PROP (1, &chjs_double, this_data->e1 = chjs_to_double(cx,vp) ) SET_JS_PROP (2, &chjs_double, this_data->e2 = chjs_to_double(cx,vp) ) SET_JS_PROP (3, &chjs_double, this_data->e3 = chjs_to_double(cx,vp) ) SET_JS_PARSE_END ////////////////////////////////////////////////////////////////////