Exemple #1
0
        public void PrintAnimCurve(FbxAnimCurve ac, TextWriter writer)
        {
            writer.Write("    KeyGetCount() = ");
            writer.Write(ac.KeyGetCount());
            writer.WriteLine();
            int k;

            for (k = 0; k < ac.KeyGetCount(); k++)
            {
                var key = ac.KeyGet(k);

                writer.Write("        #{0}: {1}, ", k, key.GetTime().Print());

                writer.Write("{0:g5}", key.GetValue());
                writer.Write(", ");
                writer.Write((int)key.GetInterpolation());
                writer.Write(":");
                writer.Write(key.GetInterpolation());
                writer.Write(", ");
                writer.Write((int)key.GetTangentMode());
                writer.Write(":");
                writer.Write(key.GetTangentMode());
                writer.Write(", ");
                writer.Write((int)key.GetTangentWeightMode());
                writer.Write(":");
                writer.Write(key.GetTangentWeightMode());
                writer.Write(", ");
                writer.Write((int)key.GetTangentVelocityMode());
                writer.Write(":");
                writer.Write(key.GetTangentVelocityMode());
                writer.Write(", ");
                writer.Write((int)key.GetConstantMode());
                writer.Write(":");
                writer.Write(key.GetConstantMode());
                writer.Write(", ");
                writer.Write((int)key.GetTangentVisibility());
                writer.Write(":");
                writer.Write(key.GetTangentVisibility());
                writer.Write(", ");
                writer.Write("Break: ");
                writer.Write(key.GetBreak() ? "1" : "0");
                writer.Write(", ");
                writer.Write("DataFloat: ");
                writer.Write("{0:G5}", key.GetDataFloat((FbxAnimCurveDef.EDataIndex) 0));
                writer.Write(", ");
                writer.Write("{0:G5}", key.GetDataFloat((FbxAnimCurveDef.EDataIndex) 1));
                writer.Write(", ");
                writer.Write("{0:G5}", key.GetDataFloat((FbxAnimCurveDef.EDataIndex) 2));
                writer.Write(", ");
                writer.Write("{0:G5}", key.GetDataFloat((FbxAnimCurveDef.EDataIndex) 3));
                writer.Write(", ");
                writer.Write("{0:G5}", key.GetDataFloat((FbxAnimCurveDef.EDataIndex) 4));
                writer.Write(", ");
                writer.Write("{0:G5}", key.GetDataFloat((FbxAnimCurveDef.EDataIndex) 5));

                writer.WriteLine();
            }
        }
Exemple #2
0
        public void _PrintFbxAnimCurve(FbxAnimCurve obj, TextWriter writer)
        {
            writer.WriteLine("    KeyGetCount() = {0}", obj.KeyGetCount());
            int k;

            for (k = 0; k < obj.KeyGetCount(); k++)
            {
                var key = obj.KeyGet(k);

                writer.Write("        #{0}: {1}, ", k, key.GetTime().Print());

                writer.Write("{0:g5}", key.GetValue());
                writer.Write(", ");
                writer.Write((int)key.GetInterpolation());
                writer.Write(":");
                writer.Write(key.GetInterpolation());
                writer.Write(", ");
                writer.Write((int)key.GetTangentMode());
                writer.Write(":");
                writer.Write(key.GetTangentMode());
                writer.Write(", ");
                writer.Write((int)key.GetTangentWeightMode());
                writer.Write(":");
                writer.Write(key.GetTangentWeightMode());
                writer.Write(", ");
                writer.Write((int)key.GetTangentVelocityMode());
                writer.Write(":");
                writer.Write(key.GetTangentVelocityMode());
                writer.Write(", ");
                writer.Write((int)key.GetConstantMode());
                writer.Write(":");
                writer.Write(key.GetConstantMode());
                writer.Write(", ");
                writer.Write((int)key.GetTangentVisibility());
                writer.Write(":");
                writer.Write(key.GetTangentVisibility());
                writer.Write(", ");
                writer.Write("Break: ");
                writer.Write(key.GetBreak() ? "1" : "0");
                writer.Write(", ");
                writer.Write("DataFloat: ");
                writer.Write("{0:G5}", key.GetDataFloat((FbxAnimCurveDef.EDataIndex) 0));
                writer.Write(", ");
                writer.Write("{0:G5}", key.GetDataFloat((FbxAnimCurveDef.EDataIndex) 1));
                writer.Write(", ");
                writer.Write("{0:G5}", key.GetDataFloat((FbxAnimCurveDef.EDataIndex) 2));
                writer.Write(", ");
                writer.Write("{0:G5}", key.GetDataFloat((FbxAnimCurveDef.EDataIndex) 3));
                writer.Write(", ");
                writer.Write("{0:G5}", key.GetDataFloat((FbxAnimCurveDef.EDataIndex) 4));
                writer.Write(", ");
                writer.Write("{0:G5}", key.GetDataFloat((FbxAnimCurveDef.EDataIndex) 5));

                writer.WriteLine();
            }
            // TODO: Evaluation and Analysis?
            // TODO: GetTimeInterval?
        }