COLLADA DOM Programming Guide 1.4.0 Erratum

Working through the examples in Chapter 6 i came across a couple of errors :-

Page 28:
if(source->getFloat_array_array().getCount() != 1)
Should be:
if(source->getFloat_array_array().getCount() != 1)

Page 29:
domFloat_array *floatArray = source->getFloat_array_array()[0];
Should be:
domFloat_array *floatArray = source->getFloat_array()[0];

I also found that the second error after fixed wouldn’t compile due to the following error:

gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)
intGeometry.cpp: In member function ‘virtual void intGeometry::fromCOLLADA()’:
intGeometry.cpp:151: error: cannot convert ‘domFloat_array’ to ‘domFloat_array*’ in initialization

Altering floatArray so that it was no longer a pointer didn’t work as domFloat_array::domFloat_array( void) is protected. So it was nessicary to get the reference like so:

domFloat_array *floatArray = (&source->getFloat_array()[0]);

This compiles fine . . . and should run . . . i think :?

Thanks for this.
This is now entered in our bug database.

Regards

Please submit this type of feedback to the sourceforge project in the future.

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