コード例 #1
0
ファイル: DAEWriter.cs プロジェクト: RicoPlays/sm64dse
        private static void WriteDAE_Node_joint(XmlWriter writer, ModelBase.BoneDef parent, bool useSRTMatricesForTransforms)
        {
            writer.WriteStartElement("node");

            writer.WriteAttributeString("id", parent.m_ID);

            writer.WriteAttributeString("name", parent.m_ID);
            writer.WriteAttributeString("sid", parent.m_ID);
            writer.WriteAttributeString("type", "JOINT");

            if (useSRTMatricesForTransforms)
                WriteDAE_Node_transformationMatrix(writer, parent);
            else
                WriteDAE_Node_transformationSRT(writer, parent);

            foreach (ModelBase.BoneDef bone in parent.GetChildren().Values)
            {
                WriteDAE_Node_joint(writer, bone, useSRTMatricesForTransforms);
            }

            writer.WriteEndElement();// node
        }