im tryin to use some transformations instead of glulookat.
my scene contains a terrain. this terrain when read in, has elevations along the z-axis, so i rotate it by 90 degrees so that the elevations show along the y axis. there are some additional rotations added along all the axis and this is makin it very difficult to implement lookat using transformations.
i have a 2d window showin the same terrain. i get the x,y values by clickin on the 2d window. but when i try translating it, it doesnt work right.
can anyone plz help me out
heres a piece of code that performs all the translations on my scene
“look at code goes here”
glTranslated 0, 0, -mdblNearField - (mdblFarField - mdblNearField) / 2
glRotatef msngRoll, 0, 0, 1
glRotatef msngHeading, 1, 0, 0
glRotatef msngPitch, 0, 1, 0
glRotated -90, 1, 0, 0
'z scale distortion glScalef 1, 1, mintzdistort 'translate to origin glTranslated -mdblActualXMin - (mdblActualXMax - mdblActualXMin) / 2, -mdblActualYMin - (mdblActualYMax - mdblActualYMin) / 2, -mdblZmin - (mdblZmax - mdblZmin) / 2
… draw the scene