コード例 #1
0
        /// <summary>
        /// Initializes instance.
        /// </summary>
        internal unsafe CubismUnmanagedParameters(IntPtr modelPtr)
        {
            var length = 0;


            Count = CubismCoreDll.GetParameterCount(modelPtr);


            length = CubismCoreDll.GetParameterCount(modelPtr);
            Ids    = new string[length];
            var _ids = (IntPtr *)(CubismCoreDll.GetParameterIds(modelPtr));

            for (var i = 0; i < length; ++i)
            {
                Ids[i] = Marshal.PtrToStringAnsi(_ids[i]);
            }


            length        = CubismCoreDll.GetParameterCount(modelPtr);
            MinimumValues = new CubismUnmanagedFloatArrayView(CubismCoreDll.GetParameterMinimumValues(modelPtr), length);

            length        = CubismCoreDll.GetParameterCount(modelPtr);
            MaximumValues = new CubismUnmanagedFloatArrayView(CubismCoreDll.GetParameterMaximumValues(modelPtr), length);

            length        = CubismCoreDll.GetParameterCount(modelPtr);
            DefaultValues = new CubismUnmanagedFloatArrayView(CubismCoreDll.GetParameterDefaultValues(modelPtr), length);

            length = CubismCoreDll.GetParameterCount(modelPtr);
            Values = new CubismUnmanagedFloatArrayView(CubismCoreDll.GetParameterValues(modelPtr), length);
        }