Ejemplo n.º 1
0
        /// <summary>
        /// Find submesh this archive/record combo will belong.
        /// </summary>
        /// <param name="mesh">Source mesh to search.</param>
        /// <param name="textureArchive">Texture archive value to match.</param>
        /// <param name="textureRecord">Texture index value to match.</param>
        /// <returns>Index of submesh matching this texture.</returns>
        private int GetSubMesh(ref PureMesh mesh, int textureArchive, int textureRecord)
        {
            for (int i = 0; i < mesh.UniqueTextures.Length; i++)
            {
                if (mesh.UniqueTextures[i].Archive == textureArchive && mesh.UniqueTextures[i].Record == textureRecord)
                {
                    return(i);
                }
            }

            throw new Exception("GetSubMesh() index not found.");
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Find submesh this archive/record combo will belong.
        /// </summary>
        /// <param name="mesh">Source mesh to search.</param>
        /// <param name="textureArchive">Texture archive value to match.</param>
        /// <param name="textureRecord">Texture index value to match.</param>
        /// <returns>Index of submesh matching this texture.</returns>
        private int GetSubMesh(ref PureMesh mesh, int textureArchive, int textureRecord)
        {
            for (int i = 0; i < mesh.UniqueTextures.Length; i++)
            {
                if (mesh.UniqueTextures[i].Archive == textureArchive && mesh.UniqueTextures[i].Record == textureRecord)
                    return i;
            }

            throw new Exception("GetSubMesh() index not found.");
        }