Esempio n. 1
0
        /// <summary>
        /// Initializes instance.
        /// </summary>
        internal unsafe CubismUnmanagedParts(IntPtr modelPtr)
        {
            var length = 0;


            Count = CubismCoreDll.GetPartCount(modelPtr);


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

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


            length    = CubismCoreDll.GetPartCount(modelPtr);
            Opacities = new CubismUnmanagedFloatArrayView(CubismCoreDll.GetPartOpacities(modelPtr), length);
        }