Results 1 to 3 of 3

Thread: Integration Library; How to call CreateTo()?

  1. #1
    RudeyPunk
    Guest

    Integration Library; How to call CreateTo()?

    Greetings!

    I'm trying to write a Collada exporter which will export a Collada document from my application. Getting the integration object registered is no problem.

    How do I call createTo() from my application? createTo is a protected function which creates restrictions in itself. Even if it were not protected, how would I get the integration object from DAE when no DAE objects exist yet?

    I know I must call createTo explicitly but I'm overwhelmed just how to do this.

    Any hints?

  2. #2
    Senior Member
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    Hey RudeyPunk, I think you've uncovered a huge flaw in the integration templates. As you mention, the guide says you're supposed to call createTo explicitly, but it's a protected function, so that's not possible. I don't believe anyone's tried to use the integration templates to create COLLADA data from scratch, so you're probably the first person to discover the problem.

    To be perfectly frank, the integration templates wouldn't be very useful for creating COLLADA models from scratch based on your runtime objects, even if it were possible to get it working. My recommendation is not to use the integration templates for that purpose. In fact, instead of fixing the problem I intend to delete those functions. The integration templates will only be used to help convert a COLLADA document to your runtime structures, and even for that they don't save you that much work.

    For your situation, maybe you could add toCollada methods to your runtime classes. Then you call toCollada on the root of your model, and the model gets traversed and the COLLADA document gets built up along the way. No integration templates are necessary.

    Let me know if this is an acceptable solution for you.

  3. #3
    RudeyPunk
    Guest
    Thanks Sthomas.

    I was afraid of just exactly what you are saying. I started working on a solution independent of the integration classes and I'll probably continue along that path until a better solution comes up.

    I was kinda hoping one of the Collada powers that be would step up and explain my folly

    Cheers!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •