Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #5119 Score: -2
      JackieZhou
      Participant
      -2 pt

      其实应该算是作业二的问题只不过当时没有发现错误。
      rasterize_triangle函数中判断BoudingBox时我自己写了一个结构体:
      struct BoudingBox{float left;float right;float top;float bottom;};
      并且如图1用其进行判断,运行时间很漫长并且得到错误的结果如图2
      如果改用注释掉的方法并且替换for循环的判断条件的话得到的就是正确的结果。
      请问是为什么,struct算计很耗时吗

      This post has received 2 votes down.
      Attachments:
      You must be logged in to view attached files.
    • #5122 Score: -1
      colors
      Participant
      -1 pt

      你的bottom那应该用y的

      This post has received 1 vote down.
Viewing 1 reply thread
  • You must be logged in to reply to this topic.