示例#1
0
        private void read_HIDE_TRACK_TAG(HideTrack3ds track)
        {
            if (mDecode != null)
            {
                mDecode.enter();
            }

            SplineKey3ds dummy = new SplineKey3ds();
            int keys = readTrackHead(track);
            track.mKey = new HideKey3ds[keys];

            for (int i = 0; i < keys; i++)
            {
                HideKey3ds key = new HideKey3ds();
                key.Frame = ReadInt();
                if (mDecode != null)
                {
                    mDecode.println("  Frame: " + key.Frame);
                }
                readSplineParams(dummy);
                track.mKey[i] = key;
            }

            if (mDecode != null)
            {
                mDecode.leave();
            }
        }
示例#2
0
        private void readSplineParams(SplineKey3ds key)
        {
            int flags = ReadUnsignedShort();

            if (flags != 0)
            {
                if ((flags & 0x01) != 0)
                {
                    key.Tension = ReadFloat();
                    if (mDecode != null)
                    {
                        mDecode.println("    Tension:    " + Utils3ds.floatToString(key.Tension, 7));
                    }
                }
                if ((flags & 0x02) != 0)
                {
                    key.Bias = ReadFloat();
                    if (mDecode != null)
                    {
                        mDecode.println("    Bias:       " + Utils3ds.floatToString(key.Bias, 7));
                    }
                }
                if ((flags & 0x04) != 0)
                {
                    key.Continuity = ReadFloat();
                    if (mDecode != null)
                    {
                        mDecode.println("    Continuity: " + Utils3ds.floatToString(key.Continuity, 7));
                    }
                }
                if ((flags & 0x08) != 0)
                {
                    key.EaseTo = ReadFloat();
                    if (mDecode != null)
                    {
                        mDecode.println("    Ease to:    " + Utils3ds.floatToString(key.EaseTo, 7));
                    }
                }
                if ((flags & 0x10) != 0)
                {
                    key.EaseFrom = ReadFloat();
                    if (mDecode != null)
                    {
                        mDecode.println("    Ease from:  " + Utils3ds.floatToString(key.EaseFrom, 7));
                    }
                }
            }
        }