# Can't Clone FVF

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

## 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 on other sites
According to the documentation, this is used to make changes to a mesh, not reproduce the same mesh.

L. Spiro

##### Share on other sites
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

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 on other sites
Why don’t you have each object use the same mesh with different matrices?

L. Spiro

##### 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

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 9
• 11
• 15
• 21
• 26