Hello Forum,

I am an absolute osg-beginner. I am currently working on a very huge project 
which is using osg. I now would like to draw something in the existing scene 
without messing everything up. I will try to give you as much detail as I can 
to make it easier to understand.

I have access to a callback-function which is called before every frame 
drawing. Also I have access to the two matices


Code:
this->rootTransform = opencover::cover->getObjectsXform()->getMatrix();

        // Get camera frustum parameters
        osg::Matrix matProj = 
opencover::coVRConfig::instance()->screens[0].camera->getProjectionMatrix();

        matProj.getFrustum(
                this->frustum.left,
                this->frustum.right,
                this->frustum.bottom,
                this->frustum.top,
                this->frustum.znear,
                this->frustum.zfar
                );




As you probably see the call opencover::coVRConfig::instance() also returns the 
instance. What I would like to do now is draw some simple lines (as in like 
glBegin) but in screen coordinates, so with positions in the frustum corners 
like (1,1,1) or (1,-1,-1).

The reason for this is that I want to make the whole frustum "visible" because 
I am using a stereoscopic VR-renderer and I want to validiate how big the 
frustum is and when do you step "into" the 3D scene.

I hope anyone can help me with this and can provide some simple sample code. If 
you need more detail, feel free to ask back.

Thank you!

Cheers,
Charma

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=50045#50045





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to