Jump to content
  • Advertisement
Sign in to follow this  
deh0512

inheriting from AnimationSet (particularly in MDX)

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

Hi all, Has anyone ever tried writing a custom AnimationSet class? I ask out of curiosity, not necessity... At any rate, here's my questions: AnimationSet is abstract, but none of its methods are abstract or virtual, which seems to imply there's nothing to be done there. But if I were to create a new type of AnimationSet, I suppose the AnimationController should want to call these methods... in which case I would want to override them. I can get around that in C# by declaring my methods "new", but I would think an abstract class would have at least one abstract or virtual method. Also, in MDX, the only constructor for AnimationSet takes a pointer to an unmanaged AnimationSet object... It's impossible to write a constructor for the sub-class without calling the base constructor with some pointer. So what am I supposed to pass the base constructor? I can pass IntPtr.Zero (basically null), but I have a feeling that is going to screw things up later on. I feel like Microsoft doesn't want us to inherit from AnimationSet, but the documentation says that it can be done. I thought maybe someone else has been adventurous enough to try it before me... Thanks,

Share this post


Link to post
Share on other sites
Advertisement
Hmm.

It looks like the SlimDX AnimationSet is written the same way. But I see your point; the docs do say that you can provide your own implementation if you want to. (Although what the hell that would entail doing, I have no idea.) I'm guessing the MDX guys made the same mistake we did, and never realized it could be implemented by users in the first place. In any case, I believe this is a bug in both libraries, and never noticed simply because no one ever tried to do this sort of thing. (And why would they? There's literally zero documentation on how you could possibly start.) I'll look into fixing it for SlimDX, although I'm reasonably certain nobody will ever care.

Share this post


Link to post
Share on other sites

Quote:
And why would they? There's literally zero documentation on how you could possibly start.

I wouldn't think it would be that hard... the method names are fairly self explanatory.
Quote:
I'm reasonably certain nobody will ever care.

There's always people like me making things complicated for people like you [smile].

Thanks anyway Promit. I've been meaning to look into SlimDX for my own endeavors, but I'm stuck in MDX for my project at work (for the time being anyway). I guess if you do change things in SlimDX, I'll be the only one to ever use it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

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