|
| void | SDTInteractor_setFirstResonator (SDTInteractor *x, SDTResonator *p) |
| | Sets the pointer to the first interacting resonator. More...
|
| |
| void | SDTInteractor_setSecondResonator (SDTInteractor *x, SDTResonator *p) |
| | Sets the pointer to the second interacting resonator. More...
|
| |
| void | SDTInteractor_setFirstPoint (SDTInteractor *x, long l) |
| | Sets the contact point index for the first resonator. More...
|
| |
| void | SDTInteractor_setSecondPoint (SDTInteractor *x, long l) |
| | Sets the contact point index for the second resonator. More...
|
| |
|
double | SDTInteractor_computeForce (SDTInteractor *x) |
| | Computes a force to apply to the contact points, based on the resonators' state at the chosen pickups.
|
| |
| void | SDTInteractor_dsp (SDTInteractor *x, double f0, double v0, double s0, double f1, double v1, double s1, double *outs) |
| | Signal processing routine. Convenience method to compute the interaction force, apply it to the resonators and update their state. This method already calls the DSP routines of the two resonators, so be sure not to call them if you use this method. More...
|
| |
This abstract object acts as a generic interface implemented by all interactors. It contains two pointers to the interacting objects, information on the chosen contact points, and an algorithm that, after reading the state of the objects (displacement and velocity) at the specified contact points, accordingly computes a force to apply to those contact points. The generic interactor should never be directly instantiated, instead it should be obtained through the specific SDTImpact and SDTFriction constructors.
| void SDTInteractor_dsp |
( |
SDTInteractor * |
x, |
|
|
double |
f0, |
|
|
double |
v0, |
|
|
double |
s0, |
|
|
double |
f1, |
|
|
double |
v1, |
|
|
double |
s1, |
|
|
double * |
outs |
|
) |
| |
Signal processing routine. Convenience method to compute the interaction force, apply it to the resonators and update their state. This method already calls the DSP routines of the two resonators, so be sure not to call them if you use this method.
- Parameters
-
| [in] | f0 | Applied force to the first resonator |
| [in] | v0 | Applied velocity to the first resonator (resets position to 0, or to make contact with second object if present) |
| [in] | s0 | Fragment size of the first resonator |
| [in] | f1 | Applied force to the second resonator |
| [in] | v1 | Applied velocity to the second resonator (resets position to 0, or to make contact with first object if present) |
| [in] | s1 | Fragment size of the second resonator |
| [out] | outs | Displacement of the resonators at their pickup points |
Sets the contact point index for the first resonator.
- Parameters
-
| [in] | Number | of the first resonator pickup chosen for interaction |
Sets the pointer to the first interacting resonator.
- Parameters
-
| [in] | p | Pointer to a SDTResonator instance |
Sets the contact point index for the second resonator.
- Parameters
-
| [in] | Number | of the second resonator pickup chosen for interaction |
Sets the pointer to the second interacting resonator.
- Parameters
-
| [in] | p | Pointer to a SDTResonator instance |