Jump to content
  • Advertisement
Sign in to follow this  
deadstar

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

This topic is 3653 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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;
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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!