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