I've got a problem
I am writing a program in openGL, and using NeHe''s base code. For some reason, when I run the compiled .exe file, when I quit, it doesn''t set my resolution back to what it was before I started the program. It didn''t used to do that, but it does now. Does anyone know what I could have goofed up ? Thanks a bunch.
Also, does anyone know how to calculate the angle of a quad/tri in relation to another one ? Like the angle that they intersect or meet at ? That could be extremely helpful.
The Kid
I don''''t know what the future holds, but I know who holds the future.
I don''t know what the future holds, but I know who holds the future.
It doesn''t set your res back becuase it has an error and doen''t reach that part
use your debugger/print statements to figure out exaclty where the program hangs.
for angle between quad/tri, find the normals for both the objects.
if normals are N1(x1,y1,z1) N2(x2,y2,z2) you can find angle between them using dot product
N1.N2 = |N1||N2|cos(theta)
N1.N2 works out to x1*x2 + y1*y2 + z1*z2
|N1| is sqrt(x1^2 + y1^2 + z^2)
do a cos inverse and then find angle theta!
i dun know if theres a simpler way
for angle between quad/tri, find the normals for both the objects.
if normals are N1(x1,y1,z1) N2(x2,y2,z2) you can find angle between them using dot product
N1.N2 = |N1||N2|cos(theta)
N1.N2 works out to x1*x2 + y1*y2 + z1*z2
|N1| is sqrt(x1^2 + y1^2 + z^2)
do a cos inverse and then find angle theta!
i dun know if theres a simpler way
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement