Home Forums GAMES在线课程(现代计算机图形学入门)讨论区 作业三normal mode输出后上下左右颠倒

Viewing 3 reply threads
  • Author
    Posts
    • #4269 Score: 0
      张仁杰
      Participant

      如图,我在做作业二时两个三角形上下左右就是颠倒的,但是当时没处理。
      在作业三直接把作业二的’get_projection_matrix’(如图)复制过来了,然后现在渲染出的结果也是上下左右颠倒的(如图)。
      请问各位有遇到类似的问题吗?是如何解决的?谢谢

      Attachments:
      You must be logged in to view attached files.
    • #4272 Score: 1
      Zhixiong Ren
      Participant

      因为OpenCV 是左手坐标系,Z 轴和右手坐标系是相反的

      所以变换需要多一步,同时将 x轴,和y轴变为 -x, -y

      相当于乘以
      -1, 0, 0, 0
      0, -1, 0, 0
      0, 0, 1, 0
      0, 0, 0, 1

      This post has received 1 vote up.
      Attachments:
      You must be logged in to view attached files.
    • #4274 Score: 0
      Songsong
      Participant
      4 pts

      作业1延后来的问题啦。改下投影矩阵z轴正负

    • #4276 Score: 0
      张仁杰
      Participant

      感谢,已解决,方法如2楼所示

Viewing 3 reply threads
  • You must be logged in to reply to this topic.