[Bf-committers] Another interface_draw.c question: vec[7][2]

Diederick Huijbers | Apollo Media diederick at apollomedia.nl
Sun Sep 13 01:22:57 CEST 2009


- Hi Lukas thanks a lot! I was thinking something like that, but what 
dont understand
is they value for the "y" coordinate; It'sn not the sin(angle) value but 
it looks like the inverted
cos(angle). I'm wondering why you did use this solution and not just 
sin(angle)?

- I'm also really curious how you created those nice shading? I see that 
the colors are
calculated manually and not using openGL interpolation; why not?

- and finally; where are the "button" collision checks done?

roxlu

Lukas Steiblys wrote:
> Use a calculator. Taking arcsin of the first value of each pair and 
> calculating the steps gives an average of 11.27059... degrees, or 
> approximately 90 degrees divided by 8.
>   
>> Hi,
>>
>> In interface_draw.c I see a couple of  this arrays that are used to draw 
>> rounded rectangles;
>> float vec[7][2]= {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 
>> 0.293},
>>                       {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}};
>>
>>
>> I'm wondering where these numbers came from? Probably it's a cached 
>> results of cos(angle)/sin(angle).
>> But what angle stepsize is used then?
>>
>> Roxlu
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
>>   
>>     
>
>
>   



More information about the Bf-committers mailing list