예제 #1
0
        public static Int32 GetPackedCount(CurveDataType curveType)
        {
            switch (curveType)
            {
            case CurveDataType.Float3:
                return(1);

            case CurveDataType.Float4:
                return(4);

            default:
                throw new NotSupportedException();
            }
        }
예제 #2
0
        public static Int32 GetBitsPerFloat(CurveDataType curveType)
        {
            switch (curveType)
            {
            case CurveDataType.Float3:
                return(10);

            case CurveDataType.Float4:
                return(12);

            default:
                throw new NotSupportedException();
            }
        }
예제 #3
0
        public static Int32 GetFloatCount(CurveDataType curveType)
        {
            switch (curveType)
            {
            case CurveDataType.Float3:
                return(3);

            case CurveDataType.Float4:
                return(4);

            default:
                Debug.WriteLine("Testing unknown data type: " + curveType);
                return(1);
            }
        }
예제 #4
0
파일: Frame.cs 프로젝트: yalaier/Sims4Tools
 protected Frame(int apiVersion, EventHandler handler, CurveDataType dataType)
     : base(apiVersion, handler)
 {
     this.DataType = dataType;
     mData         = new float[Curve.GetFloatCount(DataType)];
 }
예제 #5
0
 public Curve(int apiVersion, EventHandler handler, CurveType type, CurveDataType dataType, Stream s, CurveDataInfo info, IList <float> indexedFloats)
     : this(apiVersion, handler, type, dataType)
 {
     Parse(s, info, indexedFloats);
 }
예제 #6
0
 protected Curve(int apiVersion, EventHandler handler, CurveType type, CurveDataType dataType)
     : base(apiVersion, handler)
 {
     mType   = type;
     mFrames = new FrameList(handler, dataType);
 }
예제 #7
0
 public FrameList(EventHandler handler, CurveDataType type, Stream s, CurveDataInfo info, IList <float> floats)
     : base(handler)
 {
     mDataType = type;
     Parse(s, info, floats);
 }
예제 #8
0
 public FrameList(EventHandler handler, CurveDataType type, IEnumerable <Frame> ilt)
     : base(handler, ilt)
 {
     mDataType = type;
 }
예제 #9
0
 public FrameList(EventHandler handler, CurveDataType type)
     : base(handler)
 {
     mDataType = type;
 }