Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve FindBone method in AnimatedModel #82

Open
rejurime opened this issue Nov 18, 2023 · 0 comments
Open

Improve FindBone method in AnimatedModel #82

rejurime opened this issue Nov 18, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@rejurime
Copy link
Member

En AnimatedModel el metodo FindBone se deberia optimizar.

    /// <summary>
    ///     Find a bone in this Model by name.
    /// </summary>
    public Bone FindBone(string name)
    {
        foreach (var bone in Bones)
        {
            if (bone.Name == name)
            {
                return bone;
            }
        }

        return null;
    }

Esto va a buscar cada hueso por nombre. Podría estar en inicialización, pero cada vez que cambiás de animación va a ejecutarse y ya en el ejemplo de TGCito va a ejecutar ~70 veces este método. No podemos hacer esto por índice o algo similar?

@rejurime rejurime added the enhancement New feature or request label Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant