Results 1 to 4 of 4

Thread: Simple question about effects/profiles

  1. #1

    Simple question about effects/profiles

    Ok. I finally decided to breakdown and ask this on the forums. I'm a lone Collada developer with nothing but the 1.4 DOM and docs at my side. Could someone please tell me... once I have an array of abstract profiles in a variable "profileArray" like so..

    domEffect* thisEffect;
    error = pInputDAE->getDatabase()->getElement((daeElement**)&thisEffect,currentEffec t, NULL, "effect");

    domFx_profile_abstract_Array& profileArray = thisEffect->getFx_profile_abstract_array();


    How do I continue iteration to determine the exact type of profiles I'm dealing with. I know for sure my simple database has just one profile of type profile_COMMON. I can verify that by printing the getCount method on the array and even print the type "profile_COMMON". But at this point all I have is the array of abstract profiles and I want to get to a derived domProfile_COMMON class in order access other elements like diffuse, ambient, etc... I tried a simple cast such as..

    domProfile_COMMON* pCommonProfile = (domProfile_COMMON*)&profileArray[0];

    and while this compiles it crashes if I try to access methods from the pCommonProfile pointer. I'm missing something fundamental here dealing with DOM navigation and this class hierarchy.

    Hope someone can help...I'm trying to understand the basic navigation of databases with the DOM and feel like I've already milked the samples. I've got geometry navigation down well.

    Thanks,
    Lynn
    Lynn Duke
    Software Engineer

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    Is that what you are looking for ?

  3. #3
    Yes I believe it is. Didn't realize there was a forum (albiet small) over there at sourceforge.

    Thanks!!
    Lynn Duke
    Software Engineer

  4. #4
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771
    The COLLADA DOM project lives over at sourceforge.net since it's release last month. It's small but growing. I encourage you to use the resources there for DOM related discussions and issue tracking.

    http://sourceforge.net/projects/collada-dom

Posting Permissions

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