Hello Pablo,

Pablo Carneiro Elias wrote:
> Thanks Carsten,
> 
> i've tried it with points now (OSG::Pnt3f)
> 
> but something is still strange.... values are still negatives and too 
> big... any other suggestion?
> 
> heres the code im using...
> 
>     OSG::Matrix m;
>     getCamera()->getWorldToScreen( m, *(_viewport) ); // get the world 
> to screen matrix to matrix 'm'
> 
>     OSG::Pnt3f spoint;  // destination point
>     m.multMatrixPnt( _start3d, spoint ); // transform world point 

I'm sorry, I've made a mistake. To get the multiplication with the 
complete matrix you actually need multFullMatrixPnt, otherwise only the 
3x3 portion of the matrix is used (which is for many cases what one 
wants, unless the matrix does a projection of course ;) ).

        Hope it helps,
                Carsten

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to