I'm using code that is more or less equivalent to the code at http://irrlicht.sourceforge.net/tut_ode.html 's setGeomData.
Code: Select all
for( j = 0; j < theMeshBuff-> getVertexCount() ; ++j )
{
int theBaseIndex = theCurrentVertex * 3;
theVertices[theBaseIndex] = theBufferVertices[j].Pos.X;
theVertices[theBaseIndex + 1] = theBufferVertices[j].Pos.Y;
theVertices[theBaseIndex + 2] = theBufferVertices[j].Pos.Z;
std::ostringstream theDebugMsg;
theDebugMsg << "\nVertex " << theCurrentVertex << ": (" << theBufferVertices[j].Pos.X << ", " << theBufferVertices[j].Pos.Y << ", " << theBufferVertices[j].Pos.Z << ")";
OutputDebugString( theDebugMsg.str().c_str() );
++theCurrentVertex;
}
and I exported my .ms3d to plain text as proof that it's actually 8 vertices:Vertex 0: (-109.868, 4.03141, 14.4375)
Vertex 1: (-109.868, 0.949764, 14.4375)
Vertex 2: (119.868, 4.03141, 14.4375)
Vertex 3: (119.868, 0.949764, 14.4375)
Vertex 4: (119.868, 4.03141, 14.4375)
Vertex 5: (119.868, 0.949764, 14.4375)
Vertex 6: (119.868, 4.03141, -14.4375)
Vertex 7: (119.868, 0.949764, -14.4375)
Vertex 8: (119.868, 4.03141, -14.4375)
Vertex 9: (119.868, 0.949764, -14.4375)
Vertex 10: (-109.868, 4.03141, -14.4375)
Vertex 11: (-109.868, 0.949764, -14.4375)
Vertex 12: (-109.868, 4.03141, -14.4375)
Vertex 13: (-109.868, 0.949764, -14.4375)
Vertex 14: (-109.868, 4.03141, 14.4375)
Vertex 15: (-109.868, 0.949764, 14.4375)
Vertex 16: (-109.868, 4.03141, -14.4375)
Vertex 17: (-109.868, 4.03141, 14.4375)
Vertex 18: (119.868, 4.03141, -14.4375)
Vertex 19: (119.868, 4.03141, 14.4375)
Vertex 20: (-109.868, 0.949764, 14.4375)
Vertex 21: (-109.868, 0.949764, -14.4375)
Vertex 22: (119.868, 0.949764, 14.4375)
Vertex 23: (119.868, 0.949764, -14.4375)
Code: Select all
SimpleMeshFormat 1
1
Box01
8
-109.868 4.03141 14.4375
-109.868 0.949764 14.4375
119.868 4.03141 14.4375
119.868 0.949764 14.4375
119.868 4.03141 -14.4375
119.868 0.949764 -14.4375
-109.868 4.03141 -14.4375
-109.868 0.949764 -14.4375
12
1 0 1 2 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0
1 1 3 2 0 0 1 0 0 1 0 0 1 0 1 1 1 1 0
2 2 3 4 1 0 0 1 0 0 1 0 0 0 0 0 1 1 0
2 3 5 4 1 0 0 1 0 0 1 0 0 0 1 1 1 1 0
1 4 5 6 0 0 -1 0 0 -1 0 0 -1 0 0 0 1 1 0
1 5 7 6 0 0 -1 0 0 -1 0 0 -1 0 1 1 1 1 0
2 6 7 0 -1 0 0 -1 0 0 -1 0 0 0 0 0 1 1 0
2 7 1 0 -1 0 0 -1 0 0 -1 0 0 0 1 1 1 1 0
3 6 0 4 0 1 0 0 1 0 0 1 0 0 0 0 1 1 0
3 0 2 4 0 1 0 0 1 0 0 1 0 0 1 1 1 1 0
3 1 7 3 0 -1 0 0 -1 0 0 -1 0 0 0 0 1 1 0
3 7 5 3 0 -1 0 0 -1 0 0 -1 0 0 1 1 1 1 0