Revision 8069e806
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/DistortedOutputSurface.java | ||
---|---|---|
297 | 297 |
*/ |
298 | 298 |
public void setProjection(float fov, float near) |
299 | 299 |
{ |
300 |
if( fov < 180.0f && fov >=0.0f ) mFOV = fov; |
|
301 |
if( near< 1.0f && near> 0.0f ) mNear= near; |
|
300 |
if( fov < 180.0f && fov >=0.0f ) |
|
301 |
{ |
|
302 |
mFOV = fov; |
|
303 |
} |
|
304 |
|
|
305 |
if( near< 1.0f && near> 0.0f ) |
|
306 |
{ |
|
307 |
mNear= near; |
|
308 |
} |
|
309 |
else if( near<=0.0f ) |
|
310 |
{ |
|
311 |
mNear = 0.01f; |
|
312 |
} |
|
313 |
else if( near>=1.0f ) |
|
314 |
{ |
|
315 |
mNear=0.99f; |
|
316 |
} |
|
302 | 317 |
|
303 | 318 |
createProjection(); |
304 | 319 |
} |
Also available in: Unified diff
Improve Projection.