[vtkusers] changing EyeAngle doesn't work; Stereo-CrystalEyes

trull78yaoo trull78yaoo at yahoo.de
Tue Jun 21 07:15:43 EDT 2005


Hello All,

i'm a vtk/c++ beginner. 
Problem: The VRML-Import is running, but i can't change the eye seperation. 
Can you help me, please?

Jörg

int main( int argc, char *argv[] )
{
  		const char 					*newfile
= "C:\\stereo\\Visual_3D.wrl";
		
		vtkRenderer 				*ren 		=
vtkRenderer::New();
		
		vtkRenderWindow  				*renWin	=
vtkRenderWindow::New();
		
		ren->SetRenderWindow(renWin);
		
		vtkRenderWindowInteractor         	*iren		=
vtkRenderWindowInteractor::New();
		vtkInteractorStyleTrackballCamera 	*style	=
vtkInteractorStyleTrackballCamera::New(); 
		vtkVRMLImporter			    	*importObj	=
vtkVRMLImporter::New();

		importObj->SetFileName(Stereo::Newfile);
		importObj->SetRenderWindow(renWin);
		importObj->Read();

		renWin->SetStereoCapableWindow(1);
		renWin->SetStereoTypeToCrystalEyes();
		renWin->SetStereoRender(1);		

		int a = 1;
		renWin->SetFullScreen(a);

		iren->SetRenderWindow(renWin);
        	iren->SetInteractorStyle(style);

		vtkCamera *cam = vtkCamera::New();
		cam->SetEyeAngle(400.0);
		ren->SetActiveCamera(cam);

		renWin->Render();

		iren->Initialize();    
		iren->Start();
			 
		renWin->Delete();
		iren->Delete();
		style->Delete();
		importObj->Delete();
}


	

	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de



More information about the vtkusers mailing list