1. C# / Говнокод #6297

    +127

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    if (accNum > 0 && accNum < accModels.Count){
                switch (accNum)
                {
                    case 1: accModels[0].WorldMatrix = Matrix.CreateScale(0.7f) * Matrix.CreateRotationX(0.3f) * Matrix.CreateRotationY(chrYaw + MathHelper.Pi) * Matrix.CreateTranslation(plPos + Vector3.Up * 9.0f + Vector3.Transform(Vector3.Backward * 2.0f, Matrix.CreateRotationY(chrYaw + MathHelper.Pi))); break;
                    case 2: accModels[1].WorldMatrix = Matrix.CreateScale(0.5f) * Matrix.CreateRotationY(chrYaw + MathHelper.PiOver2) * Matrix.CreateTranslation(plPos + Vector3.Up * 11.0f + Vector3.Transform(Vector3.Backward + Vector3.Right * 3.0f, Matrix.CreateRotationY(chrYaw + MathHelper.PiOver2))); break;
                    case 3: accModels[2].WorldMatrix = Matrix.CreateScale(0.5f) * Matrix.CreateRotationY(chrYaw + MathHelper.PiOver2) * Matrix.CreateTranslation(plPos + Vector3.Up * 11.0f + Vector3.Transform(Vector3.Backward + Vector3.Right * 3.0f, Matrix.CreateRotationY(chrYaw + MathHelper.PiOver2))); break;
    
                    case 4: accModels[3].WorldMatrix = Matrix.CreateScale(0.5f) * Matrix.CreateRotationY(chrYaw - MathHelper.PiOver2) * Matrix.CreateTranslation(plPos + Vector3.Up * 5.0f + Vector3.Transform(Vector3.Backward * 0.0f + Vector3.Right * 0.7f, Matrix.CreateRotationY(chrYaw + MathHelper.PiOver2))); break;
                    case 5: accModels[4].WorldMatrix = Matrix.CreateScale(0.55f) * Matrix.CreateRotationZ(0.3f) * Matrix.CreateRotationY(chrYaw - MathHelper.PiOver2) * Matrix.CreateTranslation(plPos + Vector3.Up * 5.0f + Vector3.Transform(Vector3.Backward * 0.0f + Vector3.Right * 0.7f, Matrix.CreateRotationY(chrYaw + MathHelper.PiOver2))); break;
                    case 6: accModels[5].WorldMatrix = Matrix.CreateScale(0.5f) * Matrix.CreateRotationY(chrYaw - MathHelper.PiOver2) * Matrix.CreateTranslation(plPos + Vector3.Up * 18.0f + Vector3.Transform(Vector3.Right * -0.4f, Matrix.CreateRotationY(chrYaw - MathHelper.PiOver2))); break;
                    <...>
                   case 11: accModels[10].WorldMatrix = Matrix.CreateScale(1.2f) * Matrix.CreateRotationX(-0.3f) * Matrix.CreateRotationY(chrYaw) * Matrix.CreateTranslation(plPos + Vector3.Up * 8.5f + Vector3.Transform(Vector3.Backward * 1.4f, Matrix.CreateRotationY(chrYaw + MathHelper.Pi))); break;
                    case 12: accModels[11].WorldMatrix = Matrix.CreateScale(1.0f) * Matrix.CreateRotationX(0.3f) * Matrix.CreateRotationY(chrYaw + MathHelper.Pi) * Matrix.CreateTranslation(plPos + Vector3.Up * 9.0f + Vector3.Transform(Vector3.Backward * 2.0f, Matrix.CreateRotationY(chrYaw + MathHelper.Pi))); break;
                    case 13: accModels[12].WorldMatrix = Matrix.CreateScale(1.0f) * Matrix.CreateRotationY(chrYaw - MathHelper.PiOver2) * Matrix.CreateTranslation(plPos + Vector3.Up * -1.0f + Vector3.Transform(Vector3.Backward * 2.0f, Matrix.CreateRotationY(chrYaw + MathHelper.Pi))); break;
                    case 14: accModels[13].WorldMatrix = Matrix.CreateScale(1.0f) * Matrix.CreateRotationZ(-0.3f) * Matrix.CreateRotationY(chrYaw + MathHelper.PiOver2) * Matrix.CreateTranslation(plPos + Vector3.Up * 4.0f + Vector3.Transform(Vector3.Backward * 1.3f, Matrix.CreateRotationY(chrYaw + MathHelper.Pi))); break;
    
                    case 15: accModels[14].WorldMatrix = Matrix.CreateScale(0.4f) * Matrix.CreateRotationY(chrYaw) * Matrix.CreateTranslation(plPos + Vector3.Up * 22.0f + Vector3.Transform(Vector3.Right * 1.3f + Vector3.Backward * 3.8f, Matrix.CreateRotationY(chrYaw + MathHelper.Pi))); break;
    
                    default: accModels[accNum - 1].WorldMatrix = Matrix.CreateScale(0.7f) * Matrix.CreateRotationX(0.3f) * Matrix.CreateRotationY(chrYaw + MathHelper.Pi) * Matrix.CreateTranslation(plPos + Vector3.Up * 9.0f + Vector3.Transform(Vector3.Backward * 1.3f, Matrix.CreateRotationY(chrYaw + MathHelper.Pi))); break;
    
                }
    }

    Ой как мне не хотелось это в XMLку выносить...

    Запостил: RaZeR, 09 Апреля 2011

    Комментарии (7) RSS

    Добавить комментарий