unsafe void learn_the_surface(ref surface current_surface, ref state_model current_model, int flag) { double left_height = 0; double right_height = 0; if (flag == 1) { //reycast right Raycasting(flag, ref left_height, ref right_height); current_surface.start_x = current_model.Coord.x; current_surface.start_y = current_model.Coord.y - left_height; } else { //reycast left Raycasting(flag, ref left_height, ref right_height); current_surface.start_x = current_model.Coord.x - current_surface.limitation_x; current_surface.start_y = current_model.Coord.y - left_height; } current_surface.angle = Math.Atan((left_height - right_height) / current_surface.limitation_x); }
public static unsafe extern int solve_step(ref state_model current_model, ref koef_of_model koef_model, ref surface current_surface, ref double step_time, double force);