<div dir="ltr">Thanks Robert</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 2, 2016 at 9:43 AM, Robert Osfield <span dir="ltr"><<a href="mailto:robert.osfield@gmail.com" target="_blank">robert.osfield@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 1 November 2016 at 21:45, Trajce Nikolov NICK<br>
<span class=""><<a href="mailto:trajce.nikolov.nick@gmail.com">trajce.nikolov.nick@gmail.com</a><wbr>> wrote:<br>
> Hi Community,<br>
><br>
> anyone knowing how to achieve this and with will to share?<br>
><br>
> Thanks a bunch as always !!<br>
<br>
</span>Have a look at the API's...<br>
<br>
First one to look at is osg::Polytope, create one of these with a unit<br>
frustum.  This will be in clip space.<br>
<br>
Next step transform this Polytope by the projection matrix using the<br>
transformProvidingInverse() method (to transform a plane you multiple<br>
it by the inverse of that matrix), so in our case the projection<br>
matrix transform from eye space into clip space which is the inverse<br>
of the transform we intend, but thanks to the way that planes are<br>
transformed we can just use the projection matrix directly as long as<br>
we use the transformProvidingInverse().  See the src/osg/CullStack.cpp<br>
to see this in action.<br>
<br>
Then transform into object coordinates using the same method by<br>
providing the view and model matrices.<br>
<br>
Robert.<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</div>