let get_surface ~mu
?(mu2 = 0.0)
?(bounce = 0.0)
?(bounce_vel = 0.0)
?(soft_erp = 0.0)
?(soft_cfm = 0.0)
?(motion1 = 0.0)
?(motion2 = 0.0)
?(slip1 = 0.0)
?(slip2 = 0.0) () =
let mode = [] in
let mode = if mu2 = 0.0 then mode else `dContactMu2 :: mode in
let mode = if bounce = 0.0 then mode else `dContactBounce :: mode in
let mode = if bounce_vel = 0.0 then mode else `dContactBounce :: mode in
let mode = if soft_erp = 0.0 then mode else `dContactSoftERP :: mode in
let mode = if soft_cfm = 0.0 then mode else `dContactSoftCFM :: mode in
let mode = if motion1 = 0.0 then mode else `dContactMotion1 :: mode in
let mode = if motion2 = 0.0 then mode else `dContactMotion2 :: mode in
let mode = if slip1 = 0.0 then mode else `dContactSlip1 :: mode in
let mode = if slip2 = 0.0 then mode else `dContactSlip2 :: mode in
{
sp_mode = mode;
sp_mu = mu;
sp_mu2 = mu2;
sp_bounce = bounce;
sp_bounce_vel = bounce_vel;
sp_soft_erp = soft_erp;
sp_soft_cfm = soft_cfm;
sp_motion1 = motion1;
sp_motion2 = motion2;
sp_slip1 = slip1;
sp_slip2 = slip2;
}