My program creates array of voxels of any scanned object. What I want is to rotate the object around its center.
Right now my code displays the object but when I rotate it, it is rotated around some point which cause the object to go outside the window. I rather want to rotate the object around its center, so that I could see its all parts in the window. I have already calculated the center of the object and I have put center of interest in gluLookAt function as center of the object.
Can anyone please help me out to solve this problem.