Control layer for the impact model, generating breaking sonic textures. Two main outputs are exposed: energy and size. The former should be used to control the impact velocity, the latter should be used to control the size of the resonators.
| void SDTBreaking_dsp |
( |
SDTBreaking * |
x, |
|
|
double * |
outs |
|
) |
| |
Single iteration of the whole breaking process. Call this routine in a loop to simulate a breaking process. The loop should end when SDTBreaking_hasFinished() returns true.
- Parameters
-
| [out] | outs | Pointer to the output array: impact energy and fragment size |
Object destructor.
- Parameters
-
| [in] | x | Pointer to the instance to destroy |
Checks if the breaking process is finished, i.e. if the remaining energy is 0.
- Returns
- 1 (true) if the remaining energy is <= 0, 0 (false) otherwise.
Object constructor.
- Returns
- Pointer to the new instance
Resets the crumpling process, restoring its initial energy and triggering the first micro impact.
- Parameters
-
| [out] | outs | Pointer to the output array: impact energy and fragment size |
| void SDTBreaking_setCrushingEnergy |
( |
SDTBreaking * |
x, |
|
|
double |
f |
|
) |
| |
Sets the crushing energy.
- Parameters
-
| [in] | f | Average energy of the micro impacts, compared to the global energy of the process, in N |
| void SDTBreaking_setFragmentation |
( |
SDTBreaking * |
x, |
|
|
double |
f |
|
) |
| |
Sets the amount of progressive fragmentation of the object during the process.
- Parameters
-
| [in] | f | Object fragmentation [0, 1] |
| void SDTBreaking_setGranularity |
( |
SDTBreaking * |
x, |
|
|
double |
f |
|
) |
| |
Sets the event density of the crumpling process.
- Parameters
-
| [in] | f | Event density [0, 1] |
| void SDTBreaking_setStoredEnergy |
( |
SDTBreaking * |
x, |
|
|
double |
f |
|
) |
| |
Sets the total energy stored in the object.
- Parameters
-
| [in] | f | Total stored energy consumed by the micro impacts, in N |