[...]
for (int vertloop = 0; vertloop < 3; vertloop++) // Loop Through All The Vertices
{
readstr(filein,oneline); // Read String To Work With
// Read Data Into Respective Vertex Values
sscanf(oneline, "%f %f %f %f %f %f %f", &x, &y, &z, &u, &v);
// Store Values Into Respective Vertices
sector1.triangle[triloop].vertex[vertloop].x = x; // Sector 1, Triangle triloop, Vertice vertloop, x Value=x
sector1.triangle[triloop].vertex[vertloop].y = y; // Sector 1, Triangle triloop, Vertice vertloop, y Value=y
sector1.triangle[triloop].vertex[vertloop].z = z; // Sector 1, Triangle triloop, Vertice vertloop, z Value=z
sector1.triangle[triloop].vertex[vertloop].u = u; // Sector 1, Triangle triloop, Vertice vertloop, u Value=u
sector1.triangle[triloop].vertex[vertloop].v = v; // Sector 1, Triangle triloop, Vertice vertloop, v Value=v
}
[...]
Why are 7 floating point values scanned, and only 5 stored?
It's probably a really stupid question... but you were all beginners too None of you were born with a laptop in 1 hand and a C++ Programming book in the other LOL, anyway, thanks for any responses I get :D
-Spencer Quirk
3D Modeller/Wannabe Programmer
www.unrealfortress.com
Edited by - SpencerX2K on March 23, 2001 11:04:46 PM
Just a quick question 'bout NeHe's lesson 10
As I was scanning through the source... I saw that... well.. take a look:
-Spencer Quirk3D Modeller && Webmaster && Creative Mind Owner && MCSE Training && Wannabe C++ Programmer :Dwww.unrealfortress.com
Hmm. I''d say it''s a bug/typo, change it to only 5 and see if it works. There are only 5 values on each line in the data file.
Yeah thats what I was thinking too.. however.. the program seems to run just fine as it is... perhaps he was showing us that values scanned, but not stored just get NULLified
-Spencer Quirk
3D Modeller && Webmaster && Creative Mind Owner && MCSE Training && Wannabe C++ Programmer :D www.unrealfortress.com
-Spencer Quirk
3D Modeller && Webmaster && Creative Mind Owner && MCSE Training && Wannabe C++ Programmer :D www.unrealfortress.com
-Spencer Quirk3D Modeller && Webmaster && Creative Mind Owner && MCSE Training && Wannabe C++ Programmer :Dwww.unrealfortress.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement