Revision 8ff32d4d
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/examples/vertex3d/Vertex3DRenderer.java | ||
---|---|---|
49 | 49 |
private DistortedBitmap mBackground; |
50 | 50 |
private DistortedBitmap mCenter; |
51 | 51 |
private DistortedBitmap mRegion; |
52 |
private int mObjWidth, mObjHeight; |
|
52 |
private int mObjWidth, mObjHeight, mObjDepth;
|
|
53 | 53 |
private DynamicQuat mQuatInt1, mQuatInt2; |
54 | 54 |
|
55 | 55 |
private Dynamic3D mCenterInter, mRegionInter; |
... | ... | |
75 | 75 |
|
76 | 76 |
mObjWidth = mObject.getWidth(); |
77 | 77 |
mObjHeight= mObject.getHeight(); |
78 |
mObjDepth = mObject.getDepth(); |
|
78 | 79 |
|
79 | 80 |
mQuat1 = new Static4D(0,0,0,1); // unity |
80 | 81 |
mQuat2 = new Static4D(0,0,0,1); // quaternions |
... | ... | |
176 | 177 |
mCenter.quaternion(mQuatInt2, rotateCen); |
177 | 178 |
|
178 | 179 |
mCenter.move( new Static3D( (width -factorCen*centerSize-mFactorObj*mObjWidth )/2 , |
179 |
(height-factorCen*centerSize-mFactorObj*mObjHeight)/2 , 10) ); |
|
180 |
(height-factorCen*centerSize-mFactorObj*mObjHeight)/2 , mFactorObj*mObjDepth/2+10) );
|
|
180 | 181 |
mCenter.move(mCenterInter); |
181 | 182 |
mCenter.scale(factorCen); |
182 | 183 |
|
... | ... | |
184 | 185 |
mRegion.quaternion(mQuatInt2, rotateCen); |
185 | 186 |
|
186 | 187 |
mRegion.move( new Static3D( (width -mFactorObj*mObjWidth )/2 , |
187 |
(height-mFactorObj*mObjHeight)/2 , 12) ); |
|
188 |
(height-mFactorObj*mObjHeight)/2 , mFactorObj*mObjDepth/2+12) );
|
|
188 | 189 |
mRegion.move(mCenterInter); |
189 | 190 |
mRegion.move(mRegionInter); |
190 | 191 |
mRegion.scale(mRegionScaleInter); |
Also available in: Unified diff
Finally fix the 'when rendering though an FBO, the other side of triangles is visible'