thanks for your answer,
I’m writing this library in C99 which is almost finished parsing (except animation and MathML) and writing a viewer/renderer to validate my progress.
My lib supports any coord sys including RH, so I’m converting all transforms (marices, rot, scale, trans…) after parsing node to new coord sys,
All new model transforms converted correctly to new coord sys except camera orientation.
Camera in Z_UP looking toward -Z, but -Z is -Y in Y_UP so I must apply extra rotation for camera after converted transfroms to new coord sys,
If camera[s] and geom[s] exist in same node with same matrix then a big problem occours:
- I cant rotate transform for camera because the transform is correct for geometry (because it is alreay converted to new coord sys)
- I cant use directly because camera needs be rotated to old -Z direction to get same view matrix
I solved this by separating camera to new node (make sure all cameras have unique node) and append new rotation element (during parsing) or rotate matrix directly (if only matrix exists). Now everthing looks perfect
Since I’m parsing by exported order it must be work fine, I think
AFAIK OpenCOLLADA also generates C++ classes using COLLADA scheme but it seems very complicated to me
Also I can use C++/C++11 very well but I like C more than C++.
In the FUTURE I may interest in generate C parser for COLLADA XSD, not bad idea, but not for now.