Hi,
here is a new patch for ComputeSphereVisibility implementing Henri and Franck's idea.
The problem is that the test takes the value 0x3f once (if the test is correct), and that my function can not never obtain such a value.
Any idea to fix this problem. Here is the only one link talking about ComputeSphereVisibility
http://209.85.135.104/search?q=cache:ZkQTOaa7h7UJ:salaam.cs.buap.mx/EBOOKS/I...
Thanks for the help.
David --- En date de : Lun 17.11.08, Henri Verbeet hverbeet@gmail.com a écrit : De: Henri Verbeet hverbeet@gmail.com Objet: Re: ComputeSphereVisibility: a patch À: "Frank Richter" frank.richter@gmail.com Cc: "paulo lesgaz" jeremielapuree@yahoo.fr, wine-devel@winehq.org Date: Lundi 17 Novembre 2008, 0h21
2008/11/15 Frank Richter frank.richter@gmail.com:
On 14.11.2008 20:27, paulo lesgaz wrote:
Hi,
here is a patch for a first try to implement ComputeSphereVisibility. Any feedback is welcome.
I think you can simplify the sphere-plane intersection. Just compute the signed distance D of the sphere center from the plane. If D > r, the sphere is visible. If -r <= D <= r, the sphere is partially visible.
if
D < -r, it's invisible.
Yeah, that's basically what I described in my earlier mail.