World size
People, I''m a newbie and I would like to know, if there are limitations about the space 3D in OpenGL.
Until where I can position my objects?
Are there any function to set the size of the space 3D?
Thank you very mutch guys, and sorry for my bad english.
December 28, 2001 05:07 AM
> People, I''m a newbie and I would like to know, if there are limitations about the space 3D in OpenGL
No, not really. The limit is the range a float can hold, but since you can rescale your world, this isn''t a real problem either. You could run into precision problems, though.
No, not really. The limit is the range a float can hold, but since you can rescale your world, this isn''t a real problem either. You could run into precision problems, though.
Thank you very mutch ''Anonymous User''!
I''ll try to do some tests scalling the 3D world!
I''ll try to do some tests scalling the 3D world!
Huuummm an other little question...
I tryied to do some scaling, and I noted that the lowest value that we can use is glScalef(0.0f, 0.0f, 0.0f)....
Now I would like to know, if there any other form to give a lower value to glScalef... Because, for me, it sound very strange, that we can only scale down 1 unit... (because the Identity matrix is glScalef(1.0f, 1.0f, 1.0f).
I tryied to do some scaling, and I noted that the lowest value that we can use is glScalef(0.0f, 0.0f, 0.0f)....
Now I would like to know, if there any other form to give a lower value to glScalef... Because, for me, it sound very strange, that we can only scale down 1 unit... (because the Identity matrix is glScalef(1.0f, 1.0f, 1.0f).
To scale your world you just need to multiply every vertex with a number (don''t forget to scale your movement,and camera position to) e.g. multiply by 0.01 so everything in your world is 100 time smaller.
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
Right, as Gearge said, glScalef, as it name implies, scales your object by whatever values it has. Thus glScalef(1,1,1) will scale your object 1x, that is: no change. glScalef (10,10,10) will make it 10x larger and glScalef(0.1,0.1,0.1) 10x smaller. So glScalef(0,0,0) will make your object infinitely small.
In response to your earlier question, the size limit of your univers is defined by the data type you use for x,y, and z coordinates. if you use floats that is something like 10,000,000,000,000,000,000,000,000,000,000 units, if you use doubles you can add some 300 zeros to that. More practically, though, the VISIBLE limit of your world is the distance to your far clipping plane. If you use
gluPerspective(fov,ratio,0.2f,100.0f);
Then your far clipping plane is 100 units from the user and you will not be able to see beyond that. So 100 units is effectively the visible limit of your world.
In response to your earlier question, the size limit of your univers is defined by the data type you use for x,y, and z coordinates. if you use floats that is something like 10,000,000,000,000,000,000,000,000,000,000 units, if you use doubles you can add some 300 zeros to that. More practically, though, the VISIBLE limit of your world is the distance to your far clipping plane. If you use
gluPerspective(fov,ratio,0.2f,100.0f);
Then your far clipping plane is 100 units from the user and you will not be able to see beyond that. So 100 units is effectively the visible limit of your world.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement