Advertisement Jump to content


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


Wherez my Father??!!

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

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

Share this post

Link to post
Share on other sites
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.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!