Advertisement Jump to content
Sign in to follow this  
Jackyboy

Problem on Lesson 11

This topic is 4651 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
"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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!