Jump to content
  • Advertisement

Archived

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

Raptor

Wherez my Father??!!

This topic is 6544 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
Advertisement
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!