Revision a4d59c0b
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/examples/flag/FlagActivity.java | ||
---|---|---|
48 | 48 |
|
49 | 49 |
mNoise = new Static5D(0,0,0,0,0); |
50 | 50 |
|
51 |
textAmplitude = (TextView)findViewById(R.id.flagAmplitude);
|
|
52 |
textLength = (TextView)findViewById(R.id.flagLength);
|
|
53 |
textAngleA = (TextView)findViewById(R.id.flagAngleA);
|
|
54 |
textAngleB = (TextView)findViewById(R.id.flagAngleB);
|
|
51 |
textAmplitude = findViewById(R.id.flagAmplitude); |
|
52 |
textLength = findViewById(R.id.flagLength); |
|
53 |
textAngleA = findViewById(R.id.flagAngleA); |
|
54 |
textAngleB = findViewById(R.id.flagAngleB); |
|
55 | 55 |
|
56 |
SeekBar barAmplitude = (SeekBar)findViewById(R.id.flagSeekAmplitude);
|
|
57 |
SeekBar barLength = (SeekBar)findViewById(R.id.flagSeekLength);
|
|
58 |
SeekBar barAngleA = (SeekBar)findViewById(R.id.flagSeekAngleA);
|
|
59 |
SeekBar barAngleB = (SeekBar)findViewById(R.id.flagSeekAngleB);
|
|
56 |
SeekBar barAmplitude = findViewById(R.id.flagSeekAmplitude); |
|
57 |
SeekBar barLength = findViewById(R.id.flagSeekLength); |
|
58 |
SeekBar barAngleA = findViewById(R.id.flagSeekAngleA); |
|
59 |
SeekBar barAngleB = findViewById(R.id.flagSeekAngleB); |
|
60 | 60 |
|
61 | 61 |
barAmplitude.setOnSeekBarChangeListener(this); |
62 | 62 |
barLength.setOnSeekBarChangeListener(this); |
... | ... | |
68 | 68 |
barAngleA.setProgress(25); |
69 | 69 |
barAngleB.setProgress(1); |
70 | 70 |
|
71 |
textNoiseAmplitude = (TextView)findViewById(R.id.flagNoiseAmplitude);
|
|
72 |
textNoiseLength = (TextView)findViewById(R.id.flagNoiseLength);
|
|
73 |
textNoiseAngleA = (TextView)findViewById(R.id.flagNoiseAngleA);
|
|
74 |
textNoiseAngleB = (TextView)findViewById(R.id.flagNoiseAngleB);
|
|
71 |
textNoiseAmplitude = findViewById(R.id.flagNoiseAmplitude); |
|
72 |
textNoiseLength = findViewById(R.id.flagNoiseLength); |
|
73 |
textNoiseAngleA = findViewById(R.id.flagNoiseAngleA); |
|
74 |
textNoiseAngleB = findViewById(R.id.flagNoiseAngleB); |
|
75 | 75 |
|
76 |
SeekBar barNoiseAmplitude = (SeekBar)findViewById(R.id.flagSeekNoiseAmplitude);
|
|
77 |
SeekBar barNoiseLength = (SeekBar)findViewById(R.id.flagSeekNoiseLength);
|
|
78 |
SeekBar barNoiseAngleA = (SeekBar)findViewById(R.id.flagSeekNoiseAngleA);
|
|
79 |
SeekBar barNoiseAngleB = (SeekBar)findViewById(R.id.flagSeekNoiseAngleB);
|
|
76 |
SeekBar barNoiseAmplitude = findViewById(R.id.flagSeekNoiseAmplitude);
|
|
77 |
SeekBar barNoiseLength = findViewById(R.id.flagSeekNoiseLength);
|
|
78 |
SeekBar barNoiseAngleA = findViewById(R.id.flagSeekNoiseAngleA);
|
|
79 |
SeekBar barNoiseAngleB = findViewById(R.id.flagSeekNoiseAngleB);
|
|
80 | 80 |
|
81 | 81 |
barNoiseAmplitude.setOnSeekBarChangeListener(this); |
82 | 82 |
barNoiseLength.setOnSeekBarChangeListener(this); |
... | ... | |
99 | 99 |
@Override |
100 | 100 |
protected void onPause() |
101 | 101 |
{ |
102 |
GLSurfaceView mView = (GLSurfaceView) this.findViewById(R.id.flagSurfaceView);
|
|
102 |
GLSurfaceView mView = findViewById(R.id.flagSurfaceView); |
|
103 | 103 |
mView.onPause(); |
104 | 104 |
|
105 | 105 |
Distorted.onPause(); |
... | ... | |
113 | 113 |
{ |
114 | 114 |
super.onResume(); |
115 | 115 |
|
116 |
GLSurfaceView mView = (GLSurfaceView) this.findViewById(R.id.flagSurfaceView);
|
|
116 |
GLSurfaceView mView = findViewById(R.id.flagSurfaceView); |
|
117 | 117 |
mView.onResume(); |
118 | 118 |
} |
119 | 119 |
|
... | ... | |
140 | 140 |
|
141 | 141 |
public void onProgressChanged(SeekBar bar, int progress, boolean fromUser) |
142 | 142 |
{ |
143 |
FlagSurfaceView mView = (FlagSurfaceView) this.findViewById(R.id.flagSurfaceView);
|
|
143 |
FlagSurfaceView mView = findViewById(R.id.flagSurfaceView); |
|
144 | 144 |
FlagRenderer renderer = mView.getRenderer(); |
145 | 145 |
|
146 | 146 |
switch (bar.getId()) |
Also available in: Unified diff
Massive: make the coordinate system agree with that of OpenGL (i.e. invert the Y axis).