Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 private unsafe static extern int SDTBouncing_hasFinished(SDTBouncing *x);
Exemplo n.º 3
0
 private unsafe static extern double SDTBouncing_dsp(SDTBouncing *x);
Exemplo n.º 4
0
 private unsafe static extern void SDTBouncing_reset(SDTBouncing *x);
Exemplo n.º 5
0
 private unsafe static extern void SDTBouncing_setIrregularity(SDTBouncing *x, double f);
Exemplo n.º 6
0
 private unsafe static extern void SDTBouncing_setHeight(SDTBouncing *x, double f);
Exemplo n.º 7
0
 private unsafe static extern void SDTBouncing_setRestitution(SDTBouncing *x, double f);
Exemplo n.º 8
0
 private unsafe static extern void SDTBouncing_free(SDTBouncing *x);