Checking is sides of cubes are solid
- by Christian Frantz
In relation to this question: http://gamedev.stackexchange.com/a/28524/31664
And a question I asked earlier: Creating a DrawableGameComponent
And also because my internet is too slow to get on chat.
I'm wondering how to check if the sides of a cube are solid. I've created 12 methods, each one creating indices and vertices for sides of a cube. Now when I use these methods, the cube creates how it should. All 6 sides show up and its like I didnt change a thing. How can use if statements to check if the side of a cube is solid? The pseudocode from the question above shows this:
if(!isSolidAt(x+1,y,z))
verticesToDraw += AddXPlusFace(x,y,z)
But in my case is would be:
if(!sideIsSolid)
SetUpFrontFaceIndices();
My method simply takes these index and vertex values and adds them to a list indicesToDraw and verticesToDraw, as shown in the answer above