Sign in to follow this  

Max API - Having troubles with 3DXI / IGame vertices [SOLVED]

Recommended Posts

Hi, I'm writing an export plugin for 3D Studio Max 2008 using the 3DXI headers (formerly known as IGame), and I'm having trouble making sense of the vertex list. I'm retrieving the vertices like this:
IGameMesh *CurrentMesh = (IGameMesh*) CurrentObject;

for (int i = 0; i < CurrentMesh ->GetNumberOfVerts(); i++)
		Point3 Vertex;
		Point2 TexCoord;

		//Get current vertex
		CurrentMesh ->GetVertex(i, Vertex);

		//Create sym_vector
		SYM::SYM_VECTOR3 SymVector(Vertex.x, Vertex.y, Vertex.z);

		//Get current UVCoord
		if(CurrentMesh ->GetTexVertex(i, TexCoord))
			//Add to sym_vector
			SymVector.UVCoord.u = TexCoord.x;
			SymVector.UVCoord.v = TexCoord.y;

		//Push back vertex

If I create a box, the resulting 8 vertices are something like this:
0   0   20
0   0   20
0   0  -20
0   0  -20
40  40  20
40  40  20
40  40 -20
40  40 -20
As you can see, they're doubled up. Any ideas? [Edited by - deadstar on August 18, 2008 11:23:54 AM]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this