Need help migrating from XNA to MDX: CopyAbsoluteBoneTransformsTo
XNA has a function to copy absolute bone transforms from a model. In the code below, "theModel" is my XNA Model object.
Matrix[] transforms = new Matrix[theModel.Bones.Count];
theModel.CopyAbsoluteBoneTransformsTo(transforms);
Is there an equivalent function or set of functions in Managed DirectX? I have been trying to create a Frame from which I can extract transformations for the model, but is that direction I should be going? What would be the equivalent set of functions in Managed DirectX to replicate the effect of the "CopyAbsoluteBoneTransformsTo" function?
This has been a roadblock for me. Any help would be greatly appreciated.
Thanks,
Jeremy
Quote:Original post by RDragon1His last post was about SlimDX, so I think the problem is a more general "what is XNA doing here and how can I replicate it?" Unfortunately, I have no idea.
why would you be migrating to MDX ? use xna.
Quote:Original post by PromitQuote:Original post by RDragon1His last post was about SlimDX, so I think the problem is a more general "what is XNA doing here and how can I replicate it?" Unfortunately, I have no idea.
why would you be migrating to MDX ? use xna.
That's exactly it. I am trying to figure out what XNA does here and replicate it in Managed DirectX (Actually, SlimDX). I would go with XNA, but for redistributability reasons I am currently trying to use SlimDX.
Jeremy
Have you done a search for it using Reflector on the XNA's dll? It should show you exactly how XNA is doing it.
Quote:Original post by jdjarvis
Is there an equivalent function or set of functions in Managed DirectX? I have been trying to create a Frame from which I can extract transformations for the model, but is that direction I should be going? What would be the equivalent set of functions in Managed DirectX to replicate the effect of the "CopyAbsoluteBoneTransformsTo" function?
Unfortunately, MDX doesn't have such a function out of the box AFAIK. To properly animate a skinned mesh you'll need to jump through a few hoops to get the skeleton hierarchy and animation data loaded in the first place (the DirectX SDK has some samples and here's another). The skinning & file format support in XNA actually is quite excellent and takes care of many of these details for you, so I'd stick with XNA if possible.
Quote:Original post by Headkaze
Have you done a search for it using Reflector on the XNA's dll? It should show you exactly how XNA is doing it.
That's great for educational purposes, but once you start writing code based off what you see using that tool, you tread a very thin legal line. I wouldn't recommend this user use that tool just for his own protection. Plus it's more fun to just figure things out. ;)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement