Home › Forums › GAMES在线课程(现代计算机图形学入门)讨论区 › 作业1框架的小问题 This topic has 0 replies, 1 voice, and was last updated 3 years, 8 months ago by 锟斤拷. Viewing 0 reply threads Author Posts 2021年2月19日 at 下午1:06 #7683 Score: 0 锟斤拷Participant Karma: 3 pts rasterizer.cpp中的set_pixel函数(232行)判断超出边界的条件有误,由于这里采用左下角为起点,因此point.y()的取值范围应该是(0, height]而不是[0, height),比如当point.y()的值等于0时,height - point.y()的值为height,用此时求出的ind访问frame_buf会越界,判断条件我觉得应该是 `cpp if (point.x() < 0 || point.x() >= width || point.y() <= 0 || point.y() > height) return; ` Author Posts Viewing 0 reply threads You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In