Revision b424b062
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/examples/transparency/TransparencyRenderer.java | ||
---|---|---|
214 | 214 |
|
215 | 215 |
public void onSurfaceChanged(GL10 glUnused, int width, int height) |
216 | 216 |
{ |
217 |
float size= 0.02f*OBJ_SIZE; |
|
217 | 218 |
mScreenMin = width<height ? width:height; |
218 | 219 |
|
219 | 220 |
float factor = 0.70f*mScreenMin/OBJ_SIZE; |
220 | 221 |
mScale.set(factor,factor,factor); |
221 |
mCenter.set((float)OBJ_SIZE/2, (float)OBJ_SIZE/2, -(float)OBJ_SIZE/2 );
|
|
222 |
mCenter.set((float)OBJ_SIZE/2, (float)OBJ_SIZE/2, (float)OBJ_SIZE/2 ); |
|
222 | 223 |
mMove.set( (width -factor*OBJ_SIZE)/2 ,(height-factor*OBJ_SIZE)/2 ,0); |
223 | 224 |
|
224 |
float size= 0.02f*OBJ_SIZE; |
|
225 |
|
|
226 | 225 |
for(int i=0; i<NUM_OBJECTS; i++) |
227 | 226 |
{ |
228 | 227 |
mMoveVector[i].set(size*OBJECTS[NUM*i], size*OBJECTS[NUM*i+1], size*OBJECTS[NUM*i+2]); |
Also available in: Unified diff
Make Matrix effects Rotate and Quaternion actually correct when it comes to the Z-axis. Also corresponding adjustments in apps.