示例#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
 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;
 }