<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi,<br><br>here is a new patch for ComputeSphereVisibility implementing Henri and Franck's idea.<br><br>The problem is that the test takes the value 0x3f once&nbsp; (if the test is correct), and that my function can not never obtain such a value.<br><br>Any idea to fix this problem.<br>Here is the only one link talking about ComputeSphereVisibility<br><br>http://209.85.135.104/search?q=cache:ZkQTOaa7h7UJ:salaam.cs.buap.mx/EBOOKS/IA/LIBROGAMES/Onlinebooks/Direct3D_Online/Chapter07/Chapter%25207.doc+computeSpherevisibility&amp;hl=fr&amp;ct=clnk&amp;cd=16&amp;gl=fr&amp;client=firefox-a<br><br>Thanks for the help.<br><br>David<br>--- En date de&nbsp;: <b>Lun 17.11.08, Henri Verbeet <i>&lt;hverbeet@gmail.com&gt;</i></b> a écrit&nbsp;:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">De: Henri Verbeet
 &lt;hverbeet@gmail.com&gt;<br>Objet: Re: ComputeSphereVisibility: a patch<br>À: "Frank Richter" &lt;frank.richter@gmail.com&gt;<br>Cc: "paulo lesgaz" &lt;jeremielapuree@yahoo.fr&gt;, wine-devel@winehq.org<br>Date: Lundi 17 Novembre 2008, 0h21<br><br><pre>2008/11/15 Frank Richter &lt;frank.richter@gmail.com&gt;:<br>&gt; On 14.11.2008 20:27, paulo lesgaz wrote:<br>&gt;&gt; Hi,<br>&gt;&gt;<br>&gt;&gt; here is a patch for a first try to implement ComputeSphereVisibility.<br>&gt;&gt; Any feedback is welcome.<br>&gt;<br>&gt; I think you can simplify the sphere-plane intersection. Just compute the<br>&gt; signed distance D of the sphere center from the plane. If D &gt; r, the<br>&gt; sphere is visible. If -r &lt;= D &lt;= r, the sphere is partially visible.<br>if<br>&gt; D &lt; -r, it's invisible.<br>&gt;<br>Yeah, that's basically what I described in my earlier mail.<br></pre></blockquote></td></tr></table><br>