|
From: Roger H. <rog...@mi...> - 2008-12-18 13:41:21
|
Hi Sauro and all,
First the aspect ratio bug.
In file RT.cpp in RT_SetCamera,
at the end of the routine, change the whole if statement to:
if ( aspectRatioXToY <= 1.0 )
{
Camera.hfov = Q3Math_RadiansToDegrees ( minfov ) ;
Camera.vfov = Q3Math_RadiansToDegrees ( atan ( tan ( minfov *
0.5 ) / aspectRatioXToY ) * 2.0 ) ;
}
else
{
Camera.vfov = Q3Math_RadiansToDegrees ( minfov ) ;
Camera.hfov = Q3Math_RadiansToDegrees ( atan ( tan ( minfov *
0.5 ) * aspectRatioXToY ) * 2.0 ) ;
}
The code was very nearly right but Quesa's FieldOfView is the whole
angle from one side to the other but the original calculation assumed
it was the angle from the centre of the view to the outside. Basically
I just halve the input angle and then double the output value and
cleaned the code up a tiny bit.
I will send another email later about the spot lights.
Roger.
On 17 Dec, 2008, at 17:45, Sauro Agostini wrote:
> Well done Roger. Finally these 2 old RayShade bugs are fixxed, thank
> you.
>
> I'll try the new version asap.
>
> Sauro
>
>> I have also fixed the problem with RayShade stretching images when
>> drawn into non square windows if anyone's interested.
>>
>> Roger.
>>
>>
>> ------------------------------------------------------------------------------
>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
>> Nevada.
>> The future of the web can't happen without you. Join us at MIX09
>> to help
>> pave the way to the Next Web now. Learn more and register at
>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
>> _______________________________________________
>> Quesa-develop mailing list
>> Que...@li...
>> https://lists.sourceforge.net/lists/listinfo/quesa-develop
>
>
> --
> -----------------------------------------------------------------------------
> _ ___
> |_| __| Interstudio S.r.l. Tel + 39 0573 99291 Fax + 39
> 0573 992930
> | |__ | Piazza Monteoliveto 6a http://www.interstudio.net
> |_____| I-51100 Pistoia Italy mailto:int...@in...
> -----------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
> Nevada.
> The future of the web can't happen without you. Join us at MIX09 to
> help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> Quesa-develop mailing list
> Que...@li...
> https://lists.sourceforge.net/lists/listinfo/quesa-develop
|