Revision 2f434e15
Added by Leszek Koltunski over 3 years ago
| src/main/java/org/distorted/bandaged/BandagedCreatorRenderer.java | ||
|---|---|---|
| 500 | 500 |
DistortedEffects effects = obj.getObjectEffects(); |
| 501 | 501 |
DistortedNode node = obj.getNode(); |
| 502 | 502 |
|
| 503 |
float quot1 = mObjSize[2]/ (float)mObjSize[0]; |
|
| 504 |
float quot2 = mObjSize[2]/ (float)mObjSize[1]; |
|
| 505 |
float quot3 = mObjSize[0]/ (float)mObjSize[2]; |
|
| 506 |
float quot4 = mObjSize[0]/ (float)mObjSize[1]; |
|
| 507 |
|
|
| 508 |
float quot5 = Math.max(quot1,quot2); |
|
| 509 |
float quot6 = Math.max(quot3,quot4); |
|
| 510 |
float quot7 = Math.max(quot5,quot6); |
|
| 511 |
|
|
| 512 |
int angle; |
|
| 513 |
|
|
| 514 |
if( quot7<=1.0f ) angle=120; |
|
| 515 |
else if( quot7<=1.5f ) angle= 90; |
|
| 516 |
else if( quot7<=2.0f ) angle= 60; |
|
| 517 |
else angle= 30; |
|
| 518 |
|
|
| 503 | 519 |
if( mFramebuffer==null ) |
| 504 | 520 |
{
|
| 505 | 521 |
mFramebuffer = new DistortedFramebuffer(FBO_WIDTH,FBO_HEIGHT,1, InternalOutputSurface.DEPTH_NO_STENCIL); |
| 506 | 522 |
mFramebuffer.glClearColor(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS, 1.0f); |
| 523 |
mFramebuffer.setProjection(angle,0.1f); |
|
| 507 | 524 |
} |
| 508 | 525 |
|
| 509 | 526 |
mFramebuffer.detachAll(); |
Also available in: Unified diff
Slightely improve the locally-creeated bandaged cuboid icon.