Methods Summary |
---|
public void | createTest(android.content.res.Resources res)
int width = mOutPixelsAllocation.getType().getX();
int height = mOutPixelsAllocation.getType().getY();
mScript = new ScriptC_mandelbrot(mRS);
mScript.set_gDimX(width);
mScript.set_gDimY(height);
mScript.set_gMaxIteration(50);
|
public void | onBar1Changed(int progress)
int iters = progress * 3 + 50;
mScript.set_gMaxIteration(iters);
|
public boolean | onBar1Setup(android.widget.SeekBar b, android.widget.TextView t)
t.setText("Iterations");
b.setProgress(0);
return true;
|
public void | onBar2Changed(int progress)
float scaleFactor = mScript.get_scaleFactor();
// allow viewport to be moved by 2x scale factor
float lowerBoundX = -2.f + ((progress / scaleFactor) / 50.f);
mScript.set_lowerBoundX(lowerBoundX);
|
public boolean | onBar2Setup(android.widget.SeekBar b, android.widget.TextView t)
t.setText("Lower Bound: X");
b.setProgress(0);
return true;
|
public void | onBar3Changed(int progress)
float scaleFactor = mScript.get_scaleFactor();
// allow viewport to be moved by 2x scale factor
float lowerBoundY = -2.f + ((progress / scaleFactor) / 50.f);
mScript.set_lowerBoundY(lowerBoundY);
|
public boolean | onBar3Setup(android.widget.SeekBar b, android.widget.TextView t)
t.setText("Lower Bound: Y");
b.setProgress(0);
return true;
|
public void | onBar4Changed(int progress)
float scaleFactor = 4.f - (3.96f * (progress / 100.f));
mScript.set_scaleFactor(scaleFactor);
|
public boolean | onBar4Setup(android.widget.SeekBar b, android.widget.TextView t)
t.setText("Scale Factor");
b.setProgress(0);
return true;
|
public void | runTest()
mScript.forEach_root(mOutPixelsAllocation);
mRS.finish();
|