| 366 | } |
| 367 | |
| 368 | Vector<float> Collada::_read_float_array(XMLParser &p_parser) { |
| 369 | if (p_parser.is_empty()) { |
| 370 | return Vector<float>(); |
| 371 | } |
| 372 | |
| 373 | Vector<String> splitters; |
| 374 | splitters.push_back(" "); |
| 375 | splitters.push_back("\n"); |
| 376 | splitters.push_back("\r"); |
| 377 | splitters.push_back("\t"); |
| 378 | |
| 379 | Vector<float> array; |
| 380 | while (p_parser.read() == OK) { |
| 381 | /// @todo Check for comments inside the element and ignore them. |
| 382 | |
| 383 | if (p_parser.get_node_type() == XMLParser::NODE_TEXT) { |
| 384 | // parse float data |
| 385 | String str = p_parser.get_node_data(); |
| 386 | array = str.split_floats_mk(splitters, false); |
| 387 | //array=str.split_floats(" ",false); |
| 388 | } else if (p_parser.get_node_type() == XMLParser::NODE_ELEMENT_END) { |
| 389 | break; // end parsing text |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | return array; |
| 394 | } |
| 395 | |
| 396 | Vector<String> Collada::_read_string_array(XMLParser &p_parser) { |
| 397 | if (p_parser.is_empty()) { |
nothing calls this directly
no test coverage detected