Results 1 to 2 of 2

Thread: How to create an URI?

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    3

    How to create an URI?

    Hello

    The DOM guide https://collada.org/mediawiki/index....ng_URI_Strings suggests calling setElement(*target) and subsequently resolveURI() for creating an URI address. However, the first method has been removed from the class
    The revision commentary called the method 'mostly useless', which I find odd, because there is no apparent alternative except explicit string concatenation by the developer, which kinda defeats the purpose of having a daeURI class. Am I missing something?

    The workaroung I am currently using looks like this:
    Code :
    //Material is a domPhysics_material*, Location is a daeElement*
    domInstance_physics_material* ipm = daeSafeCast<domInstance_physics_material>(Location->add("instance_physics_material"));
    daeURI url(*(Location->getDocumentURI()),std::string("#").append(Material->getId()));
    if (ipm->getDocument() == Material->getDocument()){
    ipm->setUrl(url);
    } else {
    ipm->setAttribute("url",url.getURI());
    }
    Is there a more elegant way?


    In any case, the guide should be updated.

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: How to create an URI?

    Sourceforge is the place to report things to the COLLADA DOM project tracker.

Posting Permissions

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