문제

I am making a .obj reader in Java, and am trying to test it out on a monkey head I exported from blender. What my .obj reader does to render it in JOGL, is render every square/polygon that is in the model. This loads the right image, but if I try to move one of the polygons I made, they don't all move at the same time. How would I put all of the polygons together, so all of them move at the same time. Would I just have to make a loop that moves them all one by one?

도움이 되었습니까?

해결책

Translate your polygon's matrix so polygons are rendered relative to some origin other than (0,0,0). This is the standard approach rather than manually changing polygon vertices.

If all you are viewing is this model, you could also translate your camera's position as moving the camera and moving the model will result in the same final scene if there are no other models involved.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top