sio2CameraRender
2 posters
sio2CameraRender
Hi - I just found out about this engine last night. After skimming the source, I noticed this snippet in sio2CameraRender and since there are not comments anywhere in sight (!), and I'm not up on my coffee intake for the day yet, what does this do? It seems to be taking the decimal part of the Z of the camera position and adding it to half the 'height'... Why?
Thanks
Thanks
- Code:
precision = ( float )( int )( _SIO2camera->mat[14] *= 1000.0f );
_SIO2camera->mat[14] = ( float )( precision / 1000.0f ) + _SIO2camera->height * 0.5f;
z8000- Posts : 2
Join date : 2008-10-27
Re: sio2CameraRender
z8000 wrote:Hi - I just found out about this engine last night. After skimming the source, I noticed this snippet in sio2CameraRender and since there are not comments anywhere in sight (!), and I'm not up on my coffee intake for the day yet, what does this do? It seems to be taking the decimal part of the Z of the camera position and adding it to half the 'height'... Why?
Thanks
- Code:
precision = ( float )( int )( _SIO2camera->mat[14] *= 1000.0f );
_SIO2camera->mat[14] = ( float )( precision / 1000.0f ) + _SIO2camera->height * 0.5f;
cut off some number after 0.000 . such as 0.0003432 will be cuted the tail
sw- Posts : 73
Join date : 2008-10-12
Re: sio2CameraRender
anything wrong with round()?
Oh now I see you are keeping precision to 3 decimal places.
How odd.
Oh now I see you are keeping precision to 3 decimal places.
How odd.
z8000- Posts : 2
Join date : 2008-10-27
Permissions in this forum:
You cannot reply to topics in this forum