Sign in to follow this  
deadstar

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

Recommended Posts

deadstar    536
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;
CurrentMesh->InitializeData();

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
		Subset.Vertices.push_back(SymVector);
	}


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
deadstar    536
Forget it, nothing to do with IGame at all, it was a problem with the constructor for my SYM::VECTOR class...


[Edited by - deadstar on August 18, 2008 11:10:35 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