|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjass.engine.Out
jass.engine.InOut
jass.generators.ModalObject
public class ModalObject
Vibration model of object, capable of playing sound.
| Nested Class Summary | |
|---|---|
class |
ModalObject.Contact
Represents contact with location in barycentric coordinates. |
| Field Summary | |
|---|---|
ModalModel |
modalModel
Modal data. |
float |
srate
Sampling rate in Hertz. |
| Fields inherited from class jass.engine.InOut |
|---|
sourceContainer, sourcePassivity, srcBuffers |
| Fields inherited from class jass.engine.Out |
|---|
buf, bufferSize, bufOld, lock |
| Constructor Summary | |
|---|---|
ModalObject(float srate,
int nf,
int np,
int bufferSize)
Create and initialize, but don't set any modal parameters. |
|
ModalObject(ModalModel m,
float srate,
int bufferSize)
Create and initialize with provided modal data. |
|
| Method Summary | |
|---|---|
java.lang.Object |
addSource(Source s)
Add a Source. |
void |
clearHistory()
Set state to non-vibrating. |
protected void |
computeBuffer()
Compute the next buffer and store in member float[] buf. |
void |
computeFilter()
Compute the filter coefficients used for real-time rendering from the modal model parameters. |
void |
computeResonCoeff()
Compute the reson coefficients from the modal model parameters. |
void |
removeSource(Source s)
Remove a Source. |
void |
setDamping(float dscale)
Scale dampings. |
void |
setFrequencyScale(float fscale)
Scale frequencies. |
void |
setNf(int nf)
Reduce number of modes used. |
| Methods inherited from class jass.engine.InOut |
|---|
addSource, getBuffer, getSources, resetTime |
| Methods inherited from class jass.engine.Out |
|---|
clearBuffer, copyToOld, getBuffer, getBufferSize, getTime, peekAtBuffer, setBufferSize, setTime, setTimeAndNotify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public float srate
public ModalModel modalModel
| Constructor Detail |
|---|
public ModalObject(float srate,
int nf,
int np,
int bufferSize)
srate - sampling rate in Hertz.nf - number of modes.np - number of locations.bufferSize - Buffer size used for real-time rendering.
public ModalObject(ModalModel m,
float srate,
int bufferSize)
m - modal model to load.srate - sampling rate in Hertz.bufferSize - Buffer size used for real-time rendering.| Method Detail |
|---|
public java.lang.Object addSource(Source s)
throws SinkIsFullException
addSource in interface SinkaddSource in class InOuts - Source to add.
SinkIsFullExceptionpublic void removeSource(Source s)
removeSource in interface SinkremoveSource in class InOuts - Source to remove.public void setDamping(float dscale)
d - damping scale.public void setFrequencyScale(float fscale)
fscale - frequency scale.public void setNf(int nf)
nf - number of modes to use.public void computeFilter()
public void computeResonCoeff()
public void clearHistory()
protected void computeBuffer()
computeBuffer in class Out
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||