Hello Dirk,

Following your hints concerning my problem with thick black lines worked
immediatly, so I hoped this would be the case for this problem too;-)
Unfortunatly not. Perhaps you find find some time to have a quick look
on the following code. It is from the ClusterClient tutorial with my
additions.  Execution result (with a wrl file as input) are two black
server windows, after the client connects to the two servers. The client
console shows no problems.


NodePtr scene=NullFC;
ChangeList::setReadWriteDefault();
osgInit(argc,argv);
int winid = setupGLUT(&argc, argv);
MultiDisplayWindowPtr mwin= MultiDisplayWindow::create();

beginEditCP(mwin);
// evaluate params, add servers.
// ...
MFViewportPtr* vps = mwin->getMFPort();
for (char c=0; c < vps->size(); c++) {
  mwin->subPort(c);
}
endEditCP(mwin);

mgr = new SimpleSceneManager;
NodePtr rootnode = makeCoredNode<Group>();
PerspectiveCameraPtr camera = PerspectiveCamera::create();
        
vector<ViewportPtr> viewports;
vector<MatrixCameraDecoratorPtr> cameras;
for (char c=0; c<2; c++) {
  ViewportPtr vp = Viewport::create();
  MatrixCameraDecoratorPtr cam = MatrixCameraDecorator::create();
          
  beginEditCP(cam);
  cam->setDecoratee(camera);
  endEditCP(cam);
          
  beginEditCP(vp);
  vp->setCamera(cam);
  vp->setRoot(rootnode);
  endEditCP(vp);
          
  beginEditCP(mwin);
  mwin->addPort(vp);
  endEditCP(mwin);      
          
  viewports.push_back(vp);      
  cameras.push_back(cam);
}
        
beginEditCP(scene);
scene->setCore(osg::Transform::create());
endEditCP(scene);
NodePtr cam_beacon = osg::Node::create();
TransformPtr cam_trans = osg::Transform::create();
        
beginEditCP(cam_beacon);
cam_beacon->setCore(cam_trans);
endEditCP(cam_beacon);
        
beginEditCP(camera);
camera->setBeacon(cam_beacon);
endEditCP(camera);
        
beginEditCP(rootnode);
rootnode->addChild(cam_beacon);
rootnode->addChild(scene);
endEditCP(rootnode);

mgr->setWindow(mwin );
mgr->setRoot  (rootnode);
mgr->showAll();
mwin->init();
glutMainLoop();


cheers,

thomas


Am Mittwoch, den 21.03.2007, 18:40 -0500 schrieb Dirk Reiners:
>       Hi Thomas,
> 
> Thomas Kulessa wrote:
> > Hi list,
> > 
> > following mostly
> > http://www.mail-archive.com/[email protected]/msg05374.html
> > I try to set up a cluster with one client and six servers. I have 2
> > adjacent wall projections and 2x2 adjacent floor projections in front of
> > the wall. Something like 1/3 of a CAVE.
> > If I understand the above mentioned post right, one way to achieve it,
> > is to create 6 MatrixCameraDecorators and 6 Viewports, add one camera to
> > one viewport and finally add the six viewports to the
> > MultiDisplayWindow. 
> 
> Close. You need to add the camera to all the decorators, or they won't know 
> what 
> to do. And you need to remove the original viewport, or there will be some 
> overlap.
> 
> > Then I can manipulate the PostView matrices of each
> > Decorator and so the content of each server window. 
> 
> The alternative to using the MatrixDeco is to use the ProjectionCameraDeco, 
> which knows a lot more about asymmetric viewing frustra and Caves. But if 
> you're 
> ok with calculating all the matrices yourself that's fine, too.
> 
> > Unfortunatly this
> > doesn't work. The application behaves exactly as before with only one
> > viewport and one camera (besides a powered by OpenSG logo that somehow
> > appeared)
> 
> That sounds like something basic is wrong.The logo only appears when you tell 
> the SSM to show it.
> 
> > , all windows/viewports are horizontally aligned.
> > Im also not sure if i understand the whole concept of Decorators,
> 
> For a basic description see http://en.wikipedia.org/wiki/Decorator_pattern . 
> The 
> Decorator looks like a Camera (and can be added to a Viewport), and it uses 
> another Camera underneath, but it changes the behavior somewhat.
> 
> > 1. Do I need a beacon for each camera? Or just one? Or none? I mean, 
> > whats the sense of the matrix decorator? Just for the easy access to the
> > matrices? Couldn't do the same with the beacons transform core? 
> 
> The main reason for the decorator is to be able to use the same camera for 
> all 
> the different views that you need. The idea is to have one Camera (and 
> therefore 
> one beacon), and insert a Decorator between it and the actual Viewport.
> 
> > 2. How does the MultiDisplayWindow know, which server belongs to which
> > viewport? Simply by order? 
> 
> Yes.
> 
> > Does it know how to transform the matrices in
> > the right way, when the Navigator changes position? (Since it is
> > associated with just one viewport and one beacon.)
> 
> That's what the Decorators are for.
> 
> Hope it helps
> 
>       Dirk
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
-- 
Thomas Kulessa <[EMAIL PROTECTED]>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to