Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

pebben

Mesh Vertex Coordinates

This topic is 5217 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 There! I´m trying to compute a mesh´s vertex coordinates to world space by looping through each vertex and transform coordinates. But I don´t seem to get it right. When I try to transform each vertex into world space I always get the same position result for each vertex. What is wrong? I know that the vertices in my mesh file doesn´t have the same positions. for (unsigned int i = 0; i < size; i++) { pVertex = (D3DXVECTOR3*)vertdata; //Pointer to vertex D3DXVECTOR3 vRayPos; vRayPos.x = pVertex->x; vRayPos.y = pVertex->y; vRayPos.z = pVertex->z; D3DXVec3TransformCoord(&vRayPos, &vRayPos, &m_CombinedMatrice); //Calculate Vertex Position in world coordinates. vertdata += vertexbytesize; //Move Pointer to next vertex. } /Have A Nice Day -Patrick [edited by - pebben on June 8, 2004 7:15:33 PM]

Share this post


Link to post
Share on other sites
Advertisement
nevermind to answer,,, it works. Sorry I asked this question.

/Have A Nice Day -Patrick

Share this post


Link to post
Share on other sites

  • 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!