Results 1 to 6 of 6

Thread: Gentle help for a total newbie

  1. #1
    Junior Member
    Join Date
    Oct 2008
    Posts
    3

    Gentle help for a total newbie

    Hello all,

    I'm a 3rd year student at the University of Bolton and I'm undertaking a small research project in navmeshing. I want to use COLLADA files as my main source, with it being crossplatform and everything else.

    I'm asking for gentle help because while I have a fair bit of experience at coding I'm a total newbie when it comes to COLLADA and its ways and means. Could anybody please tell me, in simple terms and hopefully with a line of code or two, how to get at the vertex data and the vertex ordering data? I found a wonderful piece of code that reads COLLADA triangle data and turns it into an OGRE mesh, and that was helpful to a degree but my brain started to hurt rather rapidly.

    I apologise if I'm asking the same question that's been asked twenty times already, but I've been wracking my brains over this all day and for every step I take forwards I seem to take at least three backwards.

    Thanks.

  2. #2
    Junior Member
    Join Date
    Apr 2006
    Posts
    14
    Hi, maybe my answer won't be what you've expected, but I think might help you. First of all try to examine xml technology, the DOM stuff - the structure and methods like navigating throut nodes and so on - its all there just read carefully, xpath, xquery and so on so you'll see it's quiet simple and will give an overall vision how to get to this stuff in a nice and elegant way.

  3. #3
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771
    There are many COLLADA projects on sourceforgewhere you can research and study working code.

    Reading the COLLADA book will be helpful to you.

    (shameless plug)

  4. #4
    Junior Member
    Join Date
    Oct 2008
    Posts
    3
    Marcus and Spirytus, thank you for your kind replies.

    I think most of all I'm having trouble getting my head around the methodology used by the DOM to access the material. It all is very confusing and doesn't seem intuitive to me at all; perhaps I'm missing some deep and fundamentally beautiful facet of the design, but all these Elements, OffsetRefs, URIFragmentTypes and Techniques is making my head spin!...

    For example, I'm trying to load in the very simple Cube.dae example. I've got it loading, using code stolen from CollOGRE that seems to work (but I don't know why, and that's bugging me, too), but it's loading in as one single mesh and not 6 small meshes, since it's a <polylist> entity.

    I have the following code:
    Code :
    domMeshRef geom_mesh=geom_item->getMesh();
    domPolylist_Array polylines=(*geom_mesh).getPolylist_array();
    int polys_in_list=(int)polylines.getCount();
    For some reason this is returning 1 and not 6 as I'd hoped/expected.

    Please forgive my puerile questions. I will get my head around this, but I'm afraid that until then I need a little hand-holding. Frankly, the learning curve for this feels like a brick wall.

  5. #5
    Junior Member
    Join Date
    Oct 2008
    Posts
    3
    ... I feel a little sheepish and embarrassed now, but I wanted to say - I have managed to get the Vcount working and the polylist loads and parses correctly.

    I'm sorry if I've been a whingeing newbie... this has really taken some getting my head around, is all. I am sure I will have more problems and questions, and I hope I may still bring them to this forum.

    Thank you again for your replies and your patience.

  6. #6
    Junior Member
    Join Date
    Apr 2006
    Posts
    14
    good to hear, just don't give up... everybody was newbie so don't affraid to ask.

Posting Permissions

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