public unsafe Bouncing(double restitution, double height, double irregularity, Impact i) { if (!i.isAttached()) { throw new NoResonatorsAttachedException("Interactor has no Resonator attached"); } else { inter = i; bounce = SDTBouncing_new(); SDTBouncing_setRestitution(bounce, restitution); SDTBouncing_setHeight(bounce, height); SDTBouncing_setIrregularity(bounce, irregularity); SDTBouncing_reset(bounce); Debug.Log(bounce->restitution); Debug.Log(bounce->height); Debug.Log(bounce->irregularity); Debug.Log("current velocity" + bounce->currentVelocity); Debug.Log("target velocity" + bounce->targetVelocity); } }
private unsafe static extern int SDTBouncing_hasFinished(SDTBouncing *x);
private unsafe static extern double SDTBouncing_dsp(SDTBouncing *x);
private unsafe static extern void SDTBouncing_reset(SDTBouncing *x);
private unsafe static extern void SDTBouncing_setIrregularity(SDTBouncing *x, double f);
private unsafe static extern void SDTBouncing_setHeight(SDTBouncing *x, double f);
private unsafe static extern void SDTBouncing_setRestitution(SDTBouncing *x, double f);
private unsafe static extern void SDTBouncing_free(SDTBouncing *x);