I'm doing the rotation on two objects in OpenGL. one which works:
Model1 = glm::translate( ... );
Model1 = glm::scale( ... );
Model1 = glm::rotate(Model1, 90 , glm::vec3(1,0,0));
and one which doesnt:
Model2 = glm::translate( ... );
Model2 = glm::scale( ... );
Model2 = glm::rotate(Model2, 90 , glm::vec3(0,0,0));
which makes my Object disappear.
I assume this is caused due to multiplication by 0 (or sth similar). Then, how should I represent No rotation?
Is axis-angle a good way of using rotations, or one should store them as quaternions and use a different function or convert back to angle-axis each time Rotation is being applied?
Then, how should I represent No rotation?
By an angle of 0 (instead of 90). Not by degenerating the rotation axis.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.