Just reposting with correct subject thread. ;-)

On 26/10/2007, Chris Denham <[EMAIL PROTECTED]> wrote:
> Hi Michele,
> Thanks for this. You're probably right, I was floundering about a bit
> in that snippet of code I sent. Robert's suggestion contained a much
> neater solution - using the sign of the dot product of the vectors
> between eye point and face normal. i.e. cull when this is negative.
> (Convieniently, the node visitor gives you the eye point in local
> coordinates). All this is neatly wrapped up in ClusterCullingCallback
> class, so all I needed was one line of code to acheive my objective!
> Cheers.
> Chris.
>
> Date: Fri, 26 Oct 2007 13:32:53 +0200
> From: "Michele Bosi" <[EMAIL PROTECTED]>
> Subject: Re: [osg-users] Backface culling for a group containing a
>       plane of        linestrips.
> To: "OpenSceneGraph Users" <[email protected]>
> Message-ID:
>       <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi Chris,
> I did something similar once, I am not totally sure but I think that the
> vector should be multiplied before the matrix and that you need to multiply
> only the direction component without the position. Once you have the
> direction transformed in camera space to see if it faces the camera you
> should only need to test if the Z component is > 0 (assuming a right handed
> reference system).
>
> Good luck,
> Michele
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to