-
Notifications
You must be signed in to change notification settings - Fork 260
Open
Description
- In COLLADAStreamWriter <float_array>'s "digits" attribute is not written even if StreamWriter::mDoublePrecision is true. According to the specification "digits" should be set to 16-17 significant decimal digits for double instead of default value of 6 digits. I guess Source class in COLLADASWSource.h should write this attribute in prepareToAppendValues() depending on Type: 7-8 digits for float, 16-17 for double. const String CSWC::CSW_ATTRIBUTE_DIGITS = "digits"; should be also added to COLLADASWConstants.
- In COLLADASaxFrameworkLoader <float_array>'s "digits" attribute is ignored. Namely, SourceArrayLoader::begin__float_array ignores float_array__AttributeData::digits field. It always calls
beginArray<FloatSource>, while it, probably, should callbeginArray<DoubleSource>if digits is big enough (more than 7-8). Ideally, Source class should also store digits value to truncate exact value by the number of digits (e.g., in data__float_array). In any case, data__float_array should acceptconst double* dataparameter and be able to determine mCurrentSoure type (btw, there is a typo in its name). Moreover, ColladaParserAutoGen14Private::_data__float_array as well as ColladaParserAutoGen15Private::_data__float_array should use characterData2DoubleData instead of characterData2FloatData so that <float_array>'s string values can be read as double values. Unfortunately, ColladaParserAutoGen14Private::_data__float_array doesn't know "digits" value so it probably can't determine whether to use float-s or double-s in each case.
Metadata
Metadata
Assignees
Labels
No labels