[Plib-users] douts about ssgCameraGetPosition
                
                Brought to you by:
                
                    sjbaker
                    
                
            
            
        
        
        
    | 
      
      
      From: Andreia R de A. S. <an...@co...> - 2003-04-18 21:31:38
      
     | 
| Hi, I'm trying to get the position of the camera with the function 
ssgGetCameraPosition but the values that are returned do not seem
correct.
The value of my camera is:
  static sgCoord cam_inicial = { { 1.0, 0.0, 0.0  }, { 0,0,0 } } ;
the part of my program that gets the position of the camera is:
	sgVec3 pos_camera;
	int xc; int yc; int zc;
	ssgSetCamera ( & cam_inicial) ;
	ssgGetCameraPosition(pos_camera);
	xc = pos_camera [0];
	yc = pos_camera [1];
	zc = pos_camera [2];
	cout<<"camera: "<<xc<<", "<<yc<<", "<<zc<<"."<<endl;
The values should be 1.0, 0.0, 0.0. But the returned values are -1, 0, 0.
I also tried this with the tux example, values don't seem correct either.
Attached is the modified tux example code.
May someone tell me what i'm doing wrong?
thank's
-- 
Andreia R. Assuncao Schneider 
Curso de Ciencia da Computacao
Universidade Federal de Lavras
 |