Revision 698ad0a8
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/examples/inflate/InflateRenderer.java | ||
---|---|---|
50 | 50 |
private DistortedEffects mEffects; |
51 | 51 |
private MeshBase mMesh; |
52 | 52 |
private DistortedScreen mScreen; |
53 |
private int mObjWidth, mObjHeight, mObjDepth;
|
|
53 |
private float mObjWidth, mObjHeight, mObjDepth;
|
|
54 | 54 |
private Static3D mMove, mScale, mCenter; |
55 | 55 |
private Static1D mAlpha; |
56 | 56 |
|
... | ... | |
74 | 74 |
mTexture = act.getTexture(); |
75 | 75 |
mMesh = act.getMesh(); |
76 | 76 |
|
77 |
mObjWidth = act.getNumCols();
|
|
78 |
mObjHeight= act.getNumRows();
|
|
79 |
mObjDepth = act.getNumSlic();
|
|
77 |
mObjWidth = mMesh.getStretchX();
|
|
78 |
mObjHeight= mMesh.getStretchY();
|
|
79 |
mObjDepth = mMesh.getStretchZ();
|
|
80 | 80 |
|
81 | 81 |
mQuat1 = new Static4D(0,0,0,1); // unity |
82 | 82 |
mQuat2 = new Static4D(0,0,0,1); // quaternions |
... | ... | |
87 | 87 |
quatInt1.add(mQuat1); |
88 | 88 |
quatInt2.add(mQuat2); |
89 | 89 |
|
90 |
mEffects = new DistortedEffects(mObjWidth,mObjHeight,mObjDepth);
|
|
90 |
mEffects = new DistortedEffects(); |
|
91 | 91 |
mEffects.apply( new MatrixEffectQuaternion(quatInt2, mCenter) ); |
92 | 92 |
mEffects.apply( new MatrixEffectQuaternion(quatInt1, mCenter) ); |
93 | 93 |
mEffects.apply( new MatrixEffectScale(mScale)); |
Also available in: Unified diff
Move the Effects.setStretch to Meshbase.setStretch