Hello,
 
I am currently working with osg 0.9.9 and I am running into some
difficulties.
 
First off I am trying to set up an orthoginal view.  I found in the
osgMatrixd library a function called makeOrtho.  This function calls for
a left, right, bottom, top, znear and zfar.  Does this function return
an Orthoginal view matrix?  Also where do I get the parameters to pass
it?  
 
This is what I am doing
 
osg::ref_ptr<Producer::Trackball> _trackBall;
osg::Matrixd *_Matrix = NULL;
double left = 0.0;
double right = 0.0;
double top = 0.0;
double bottom = 0.0;
double znear = 0.0;
double zfar = 0.0;
 
float distance = _trackBall->getDistance();
 
_Matrix = &osg::Matrixd(_trackBall->getMatrix().ptr());
 
_Matrix->getFrustum(left,right,bottom,top,znear,zfar);
 
_Matrix->makeOrtho(left,right,bottom,top,znear,zfar);
 
I try to populate my left,right,bottom,top,znear and zfar by calling the
Frustum function.  But the function returns false.  I am not sure why
because the data in the matrix seems to be valid, but at the begining of
the function when it does the check to make sure the matrix is valid it
returns false.  So when I get to the makeOrtho function I am passing it
all 0's.  So I would not get a good matrix.  I know that I am getting a
good matrix from my _trackBall->getMatrix().ptr.  Also if I do not get
the Frustum from the getFustum function, how do I get the Frustum?  Any
suggestions or ideas on what I could do here to get this to worik for
me. 
 
 
 
 
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to