Hi buratono,

buratono wrote:
> 
> Instead of using ViewMatrix or setProjectionMatrix method, can I set the 
> shear parameters of camera's Lens?
> Tom



I'm developing a visualization system with multidisplay consists of 6 LCDs.
One master machine and three slave machines are devoted to control it. 

Each slave machine has the same system to master(replica),
and have to control 2 LCDs in a column. 
Since a slave machine deals with 2 LCDs as a fullscreen space, 
I think my approach is similar to what you want to do. 

Here is my code to shear viewport of each slave machine. 
I hope it is helpful to your project

==============================================
// get current view frustum
double fLeft, fRight, fTop, fBottom, fNear, fFar = 0.0;

viewer.get()->getCamera()->getProjectionMatrixAsFrustum( fLeft, fRight, 
fBottom, fTop, fNear, fFar );


// View frustum for right two LCDs in a column
if( actOpt.m_eViewLinkPosition == RIGHT ) // please don't care about this
viewer.get()->getCamera()->setProjectionMatrixAsFrustum( fRight/2, fRight, 
fBottom, fTop, fNear, fFar );


// View frustum for left two LCDs in a column
else if( actOpt.m_eViewLinkPosition == LEFT )
viewer.get()->getCamera()->setProjectionMatrixAsFrustum( fLeft, fLeft/2, 
fBottom, fTop, fNear, fFar );


// View frustum for center two LCDs in a column
else if( actOpt.m_eViewLinkPosition == CENTER )
viewer.get()->getCamera()->setProjectionMatrixAsFrustum( fLeft/2, fRight/2, 
fBottom, fTop, fNear, fFar );

------------------------
VR Lab, Konkuk University, South Korea

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to