Help in 3D

Started by
2 comments, last by Bruno 23 years, 12 months ago
Ok, i have a problem, taht probably it''s simple to solve, but i don''t really see how. I made my asc loader, i get the coords of all the vertices of the trianlges in memory. The next step is to show them on the screen, but if the coords are like the ones below, how can i always center my objects on the screen??? should i translate them?? thanks Bruno coords:-32.242 12.9964 0 26.3322 12.9964 0 -32.242 245.998 0 26.3322 245.998 0 -32.242 12.9964 27.6865 26.3322 12.9964 27.6865 -32.242 245.998 27.6865 26.3322 245.998 27.6865
Advertisement
When you load the object just calculate the barycentre ( average of x coords, y coords ... ) for the object then if you want it centered you just translate it in the opposite direction
It''s not working, i still don''t understand why...
my pointers all have the values that i read.., but nothing shows up on the screen (
thanks anyway

Bruno
I need help on my coding.
I''m making a off file loader(kind of asc) , i have managed to read all the vertices from the file, all the coords are on the structure of pointers , but when i draw the contents of the structure into the screen everything is dark..
I have checked and rechecked everything..
Can someone look at my code, and try to figure the error on my coding?
If someone is willing to check my code, could write me at brunomtc@hotmail.com or post the e-mail here, and i will send the code..... please someone help me
Thanks
Bruno

This topic is closed to new replies.

Advertisement