🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Problem on Lesson 11

Started by
3 comments, last by Jackyboy 18 years, 2 months ago
In Lesson 11,when I reach the section of initiation for the 3 dimensional array points[x][y][3],I can't get it through.Confused by the array,I don't understand what the exact objectives of points[x][y][0],points[x][y][1],and points[x][y][2] The image is acing with 3D,so we should add a new dimension.Then what does the [0] mean?In books,I have been told if I define a array SamAy[4][4],then analysing SamAy[x][y],x stands for the "x"th row,and y stands for the "y"th column.Here,I don't know how to work on the 3rd dimension.
Advertisement
It's not the third dimention as you think it is.
X and y is the vertex order along the wave plane surface the third one contains the actual coordinates.
points[x][y][0] = x
points[x][y][1] = y
points[x][y][2] = Z

so points is as 2D array of float[3] coordinates.
"points is as 2D array of float[3] coordinates."
En......
I think that we can reach a point with points[x][y] which tells us it is in "x"th row and "y"th column,but points[x][y] is not enough to get the exact spatial coordinates,so we add float[3].As a matter of fact,[x][y] is the logical place in our mind and the [3] is the true coordinates.
All Right?
yes
Thanks.

This topic is closed to new replies.

Advertisement