Reading Collada Model info

Hi…

I have been reading the collada specification and I find it really amazing as to how logically and simply things have been woven together.

I am trying to read the dae models, exported from sketchup which I would eventually export to .egg format. Since, I am new to collada, I wanted to ask if anyone could guide me to how to read the data from source array with the help of accessor. I understand how they work, but my question is… Is there some API or some DLL, which i could include; to call a function say : data [] readAccessor(string src) ?

Also, is there any similar function which could possibly help me link up the source data to vertices and primitive elements like lines, triangles etc. ??

IF not, is parsing the .dae file and extracting the info from there my only resolute ?

Thanks

Hi BrainyDexter,

I am about to do the same thing.

I believe you can use Collada RT to read specific information from a collada dae file. The source for RT is included when you download the Collada DOM source.

I personally won’t be using the RT source but simply stepping through the dae file and reading the contents I specifically need as my models are relatively simple.

Regards,
Peter

These may also help:

Working with elements
https://collada.org/mediawiki/index.php/DOM_guide:_Working_with_elements

Resolving SIDs
https://collada.org/mediawiki/index.php/DOM_guide:_Resolving_SIDs

Hey Peter…

Even I am planning to read the source xml and extract info from there.

But hey, thanks for those links and I’d definitely go through them!

One thing though, are you also exporting it to egg format or what is your purpose of reading the dae file formats ?

I’m planning to read the data directly in to my application/game from a collada file and build/display the models using openGL. I’ve never heard of egg. I’ll have a look…