Revision dcd2cd41
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/examples/wind/WindRenderer.java | ||
---|---|---|
27 | 27 |
import org.distorted.library.effect.MatrixEffectMove; |
28 | 28 |
import org.distorted.library.effect.MatrixEffectRotate; |
29 | 29 |
import org.distorted.library.effect.MatrixEffectScale; |
30 |
import org.distorted.library.effect.MatrixEffectShear; |
|
31 | 30 |
import org.distorted.library.effect.VertexEffectDeform; |
31 |
import org.distorted.library.effect.VertexEffectScale; |
|
32 | 32 |
import org.distorted.library.effect.VertexEffectWave; |
33 | 33 |
import org.distorted.library.main.DistortedLibrary; |
34 | 34 |
import org.distorted.library.main.DistortedScreen; |
... | ... | |
37 | 37 |
import org.distorted.library.main.DistortedTexture; |
38 | 38 |
import org.distorted.library.type.Static1D; |
39 | 39 |
import org.distorted.library.type.Static3D; |
40 |
import org.distorted.library.type.Static4D; |
|
41 | 40 |
|
42 | 41 |
import java.io.IOException; |
43 | 42 |
import java.io.InputStream; |
... | ... | |
69 | 68 |
|
70 | 69 |
MeshCubes cubes = new MeshCubes(X,Y,Z); |
71 | 70 |
DistortedEffects effects = new DistortedEffects(); |
72 |
cubes.setStretch(X,Y,Z); |
|
73 | 71 |
|
74 | 72 |
mTexture = new DistortedTexture(); |
75 | 73 |
mManager = new WindEffectsManager(X,Y); |
... | ... | |
78 | 76 |
|
79 | 77 |
mScreen.attach(mTexture,effects,cubes); |
80 | 78 |
|
81 |
mObjWidth = cubes.getStretchX();
|
|
82 |
mObjHeight= cubes.getStretchY();
|
|
79 |
mObjWidth = X;
|
|
80 |
mObjHeight= Y;
|
|
83 | 81 |
|
82 |
effects.apply( new VertexEffectScale( new Static3D(X,Y,Z) ) ); |
|
84 | 83 |
mManager.apply(effects); |
85 | 84 |
|
86 | 85 |
mMove = new Static3D(0,0,0); |
... | ... | |
148 | 147 |
|
149 | 148 |
mTexture.setTexture(bitmap); |
150 | 149 |
|
150 |
VertexEffectScale.enable(); |
|
151 | 151 |
VertexEffectDeform.enable(); |
152 | 152 |
VertexEffectWave.enable(); |
153 | 153 |
|
Also available in: Unified diff
Convert Wind app to the stretch-less API.