Reaper4774
10-21-2001, 01:02 PM
Hey, all. I'm kinda new to the whole 3d-imaging, and I think I'm missing out on something very basic. Here's the general problem.
As an assignment, I'm required to create a program that depicts a simple airplane circling around a 20-story building. Before I get yelled at, please believe that this IS the assignment, which was made up long before the horrible events that make all our bowels clench in rage. If you don't believe me, email me, and I'll give you the link to the assignment.
Anyways... rather than lay out all my existing code (200+ lines at this point), I'd rather give you the gist of my objects.
The plane consists of a cylinder created using "gluCylinder", with two wings and a tail-fin, all of them "glBegin -- glEnd" polygons. The building has an instance for a window, which is then incorporated into an instance for a story (16 windows per side), which is then turned into an instance for a building. The building is constructed entirely of "glBegin -- glEnd" polygons.
Overall, I can create an airplane aligned with the y-axis by calling on function, and a building alligned with the y-axis with another. The problem is their relation to each other;
I can depict the airplane circling around the building, but the depth perception is not working properly; at the point the airplane is SUPPOSED to be behind the building, it is still completely visable.
I'm sure there's an easy way to fix this... some function or callback I've left out. If you'll inform me as to what it is, I'll be very grateful.
Thanks,
Reaper4774
As an assignment, I'm required to create a program that depicts a simple airplane circling around a 20-story building. Before I get yelled at, please believe that this IS the assignment, which was made up long before the horrible events that make all our bowels clench in rage. If you don't believe me, email me, and I'll give you the link to the assignment.
Anyways... rather than lay out all my existing code (200+ lines at this point), I'd rather give you the gist of my objects.
The plane consists of a cylinder created using "gluCylinder", with two wings and a tail-fin, all of them "glBegin -- glEnd" polygons. The building has an instance for a window, which is then incorporated into an instance for a story (16 windows per side), which is then turned into an instance for a building. The building is constructed entirely of "glBegin -- glEnd" polygons.
Overall, I can create an airplane aligned with the y-axis by calling on function, and a building alligned with the y-axis with another. The problem is their relation to each other;
I can depict the airplane circling around the building, but the depth perception is not working properly; at the point the airplane is SUPPOSED to be behind the building, it is still completely visable.
I'm sure there's an easy way to fix this... some function or callback I've left out. If you'll inform me as to what it is, I'll be very grateful.
Thanks,
Reaper4774