Wherez my Father??!!
how do i get the parent matrix of an object in the XFile Sample shipped with the DX7 SDK??
thnx.
The only way around it is Through it!!
DirectX file objects in the SDK samples don''t store a pointer to their parent, so you can''t get the parent and you can''t get the parent matrix.
However you can modify CD3DFileObject to store a pointer to its parents: Add a CD3DFileObject *m_pParent to the class members, modify the constructor to take the additional argument CD3DFileObject *pParent, set m_pParent = pParent in the constructors implementation and change every creation of a CD3DFileObject to look like this: new CD3DFileObject(strName, this)
After those changes you can retrieve the parents matrix with m_pParent->m_mat.
ArgoN
However you can modify CD3DFileObject to store a pointer to its parents: Add a CD3DFileObject *m_pParent to the class members, modify the constructor to take the additional argument CD3DFileObject *pParent, set m_pParent = pParent in the constructors implementation and change every creation of a CD3DFileObject to look like this: new CD3DFileObject(strName, this)
After those changes you can retrieve the parents matrix with m_pParent->m_mat.
ArgoN
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement