Beispiel #1
0
        /// <summary>
        /// Gets the names of all morph targets.
        /// </summary>
        /// <param name="mesh">The mesh.</param>
        /// <returns>The names of all morph targets.</returns>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="mesh"/> is <see langword="null"/>.
        /// </exception>
        public static IEnumerable <string> GetMorphTargetNames(this Mesh mesh)
        {
            if (mesh == null)
            {
                throw new ArgumentNullException("mesh");
            }

            return(new ReadOnlyCollection <string>(mesh.GetMorphTargetNames()));
        }
        //--------------------------------------------------------------
        #region Methods
        //--------------------------------------------------------------

        private static string[] GetMorphTargetNames(Mesh mesh)
        {
            if (mesh == null)
            {
                throw new ArgumentNullException("mesh");
            }

            return(mesh.GetMorphTargetNames());
        }