1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
void renderScene(void)
{
FILE *file;
float numbers[3];
float rx,ry,rz;
int i;
int b;
file = fopen("C:\\Users\\RoBa\\Desktop\\test.txt", "r");
while(!feof(file))
{ b = 0;
fscanf(file, "%f %f %f ", &numbers[b],&numbers[b+1],&numbers[b+2]);
rx = numbers[b];
ry = numbers[b+1];
rz = numbers[b+2];
cout<<rx<<endl;
cout<<ry<<endl;
cout<<rz<<endl;
glLoadIdentity();
gluLookAt(rx , ry , rz , 0.0f,0.0f,0.f,0.0f,1.0f,0.0f);
}
|