开发者

Flipping the View horizontally - How?

开发者 https://www.devze.com 2023-04-04 01:55 出处:网络
Recently I\'ve found that all of my scene objects are in left-handed coordinates, but Java 3D uses right-hand coordinates. There is a solution: flipping the scene Z-axis and reverting the triangles wi

Recently I've found that all of my scene objects are in left-handed coordinates, but Java 3D uses right-hand coordinates. There is a solution: flipping the scene Z-axis and reverting the triangles winding order. But thi开发者_如何学Cs will be a horrible mess. It seems that if I can somehow flip the view horizontally it will do the job needed. How can I achieve this? Applying Transform3D somewhere, some kind of offscreen rendering or...?


You can try changing the view by rotating it on the Z axis by 180 degrees. This is assuming your using a SimpleUniverse.

Transform3D transform = new Transform3D();
transform.rotZ(Math.PI);
transform.setTranslation(vector);
univ.getViewingPlatform().getViewPlatformTransform().setTransform(transform);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号