| 940 | } |
| 941 | |
| 942 | void ColladaUtils::exportColladaHeader(tinyxml2::XMLElement* rootNode) |
| 943 | { |
| 944 | tinyxml2::XMLDocument* doc = rootNode->GetDocument(); |
| 945 | tinyxml2::XMLElement* assetNode = doc->NewElement("asset"); |
| 946 | rootNode->LinkEndChild(assetNode); |
| 947 | |
| 948 | tinyxml2::XMLElement* contributorNode = doc->NewElement("contributor"); |
| 949 | assetNode->LinkEndChild(contributorNode); |
| 950 | |
| 951 | tinyxml2::XMLElement* authorNode = doc->NewElement("author"); |
| 952 | contributorNode->LinkEndChild(authorNode); |
| 953 | tinyxml2::XMLText* authorNodeText = doc->NewText("Torque3D MIT User"); |
| 954 | authorNode->LinkEndChild(authorNodeText); |
| 955 | |
| 956 | tinyxml2::XMLElement* authoringToolNode = doc->NewElement("authoring_tool"); |
| 957 | contributorNode->LinkEndChild(authoringToolNode); |
| 958 | tinyxml2::XMLText* authorText = doc->NewText(avar("%s %s Object Exporter", getEngineProductString(), getVersionString())); |
| 959 | authoringToolNode->LinkEndChild(authorText); |
| 960 | |
| 961 | //tinyxml2::XMLElement* commentsNode = doc->NewElement("comments"); |
| 962 | //contributorNode->LinkEndChild(commentsNode); |
| 963 | |
| 964 | // Get the current time |
| 965 | Platform::LocalTime lt; |
| 966 | Platform::getLocalTime(lt); |
| 967 | String localTime = Platform::localTimeToString(lt); |
| 968 | |
| 969 | localTime.replace('\t', ' '); |
| 970 | |
| 971 | tinyxml2::XMLElement* createdNode = doc->NewElement("created"); |
| 972 | assetNode->LinkEndChild(createdNode); |
| 973 | tinyxml2::XMLText* createdText = doc->NewText(avar("%s", localTime.c_str())); |
| 974 | createdNode->LinkEndChild(createdText); |
| 975 | |
| 976 | tinyxml2::XMLElement* modifiedNode = doc->NewElement("modified"); |
| 977 | assetNode->LinkEndChild(modifiedNode); |
| 978 | tinyxml2::XMLText* modifiedText = doc->NewText(avar("%s", localTime.c_str())); |
| 979 | modifiedNode->LinkEndChild(modifiedText); |
| 980 | |
| 981 | //tinyxml2::XMLElement* revisionNode = doc->NewElement("revision"); |
| 982 | //assetNode->LinkEndChild(revisionNode); |
| 983 | |
| 984 | //tinyxml2::XMLElement* titleNode = doc->NewElement("title"); |
| 985 | //assetNode->LinkEndChild(titleNode); |
| 986 | |
| 987 | //tinyxml2::XMLElement* subjectNode = doc->NewElement("subject"); |
| 988 | //assetNode->LinkEndChild(subjectNode); |
| 989 | |
| 990 | //tinyxml2::XMLElement* keywordsNode = doc->NewElement("keywords"); |
| 991 | //assetNode->LinkEndChild(keywordsNode); |
| 992 | |
| 993 | // Torque uses Z_UP with 1 unit equal to 1 meter by default |
| 994 | tinyxml2::XMLElement* unitNode = doc->NewElement("unit"); |
| 995 | assetNode->LinkEndChild(unitNode); |
| 996 | unitNode->SetAttribute("name", "meter"); |
| 997 | unitNode->SetAttribute("meter", "1"); |
| 998 | |
| 999 | tinyxml2::XMLElement* axisNode = doc->NewElement("up_axis"); |
nothing calls this directly
no test coverage detected