Friday, February 8, 2008

This is what happens when I'm bored

Long story short, I made a very rough draft of a format for storing 3D mesh info. This is the data for a single cube:

vertices [
0 [-1.0,-1.0,1.0]
1 [-1.0,1.0,1.0]
2 [1.0,1.0,1.0]
3 [1.0,-1.0,1.0]
4 [-1.0,-1.0,-1.0]
5 [-1.0,1.0,-1.0]
6 [1.0,1.0,-1.0]
7 [1.0,-1.0,-1.0]
]
object [
worldPosition [0,0,0]
face 0 [0,1,2,3]
face 1 [3,2,6,7]
face 2 [4,0,3,7]
face 3 [2,1,5,6]
face 4 [7,6,5,4]
face 5 [4,5,1,0]
]

Next step: write a simple importer/exporter!
Admittedly, this won't be very useful, but it was a very good learning experience, at least so far.