Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Can't Clone FVF

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


LPD3DXMESH mesh = NULL;

HRESULT hr = cb_->m_pMesh->GetMesh()->CloneMeshFVF(D3DXMESH_MANAGED, cb_->m_pMesh->GetMesh()->GetFVF(), g_pDevice, &mesh);


Looks really obvious, how come it is not successful in this case?
Thanks
Jack

Share this post


Link to post
Share on other sites
Advertisement
Hidden
Hi Spiro, I am wondering what way is the correct way of cloning a static mesh. Because I just have one copy of the mesh, but have several copies of "objects" "attached" to it if I use something like this to iterate many objects of the same kind root = m_pObject->m_pMesh->GetFrameRoot(); f = D3DXFrameFind (root, "Hand"); someMatrix = &f->matCombined; m_pObject will be dintinct each iteration. However m_pMesh will be the same mesh. Therefore, it will retreive the same mesh, several picked-up object will be "attaching" to the same hand. I want "someMatrix" to be different hence "root" to be different over each iteration. Anyways this can be done? Thanks Jack

Share this post


Link to post
Hi Spiro,
I am wondering what way is the correct way of cloning a static mesh.
Because I just have one copy of the mesh, but have several copies of "objects" "attached" to it
if I use something like this to iterate many objects of the same kind

root = m_pObject->m_pMesh->GetFrameRoot();
f = D3DXFrameFind (root, "Hand");
someMatrix = &f->matCombined;


m_pObject will be dintinct on each iteration. However m_pMesh will be the same mesh. Therefore, it will
retreive the same mesh, several picked-up object will be "attaching" to the same hand. I want "someMatrix" to be different hence "root" to be different over each iteration. Anyways this can be done?
Thanks
Jack

Share this post


Link to post
Share on other sites
Hmmm... The cornerstone is I have to retrieve the matrix I am after from the static mesh.... Otherwise, they will be different.

XX <- Mesh Hierarchy
/ | \
object a b c


Actually, I am looking for the hand of the humanoid mesh, it comes from the combined transformation matrix of a single mesh.
There is not a second matrix that I can manipulate which can be used to control the hand. The point is retrieval.
Any help is greatly appreciated!
Thanks
Jack

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!