Jump to content
  • Advertisement
Sign in to follow this  

multiple transform

This topic is 3615 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

Hy. II have 2 meshes and i would scale the first of 3 unit , the second of -1 uni i have the tree meshes in a vector and i do this:
std::vector<CMeshBase*>::iterator itMesh; for(itMesh = m_AllMeshes.begin();itMesh != m_AllMeshes.end();itMesh++) { Device->SetMaterial(&mtrl); CMeshBase* pmesh=((CMeshBase*)*itMesh); if(pmesh->getName().find("B-floor-mesh")!=string::npos ) { D3DXMatrixRotationX(&pmesh->mxRotate,-240); D3DXMatrixTranslation(&pmesh->mxTranslate,5.234062 ,-1.04631 ,0.148801); D3DXMatrixScaling(&pmesh->mxScale,3,3,3); Device->SetTransform(D3DTS_WORLD,&pmesh->mxScale); pmesh->mesh->DrawSubset(0); } if(pmesh->getName().find("F430")!=string::npos) { D3DXMatrixRotationX(&pmesh->mxRotate,-180); D3DXMatrixTranslation(&pmesh->mxTranslate,-0.676137 ,0.016215 ,0.56571); D3DXMatrixScaling(&pmesh->mxScale,-1,-1,-1); D3DXMATRIX World=pmesh->mxRotate*pmesh->mxTranslate*pmesh->mxScale; Device->SetTransform(D3DTS_WORLD, &World); pmesh->mesh->DrawSubset(0); } }
but this apply only the last transformation why? How i cand do this with directx9? THanks

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!