ComputeSphereVisibility: a patch

Henri Verbeet hverbeet at gmail.com
Mon Nov 17 03:24:44 CST 2008


2008/11/17 paulo lesgaz <jeremielapuree at yahoo.fr>:
> 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.
>
Looks like you need to set one of the
D3DVIS_INSIDE_FRUSTUM/D3DVIS_INTERSECT_FRUSTUM/D3DVIS_OUTSIDE_FRUSTUM
flags, depending on which applies. The values of the flags also
suggest INSIDE/OUTSIDE applies to the sphere centers rather than the
sphere as a whole. Ie, you can have both D3DVIS_INSIDE_LEFT and
D3DVIS_INTERSECT_LEFT set. You would need to write tests for this, of
course.

> +        vec.u1.x = m._14 + m._11;
> +        vec.u2.y = m._24 + m._21;
> +        vec.u3.z = m._34 + m._31;
> +        origin_plane = m._44 + m._41;
Note that the planes you get from this aren't necessarily normalized.



More information about the wine-devel mailing list