【问题标题】:Get a rotated texture width and height获取旋转的纹理宽度和高度
【发布时间】:2013-06-24 20:19:17
【问题描述】:

好吧,你好,我有一个问题,这次是关于脚本的。
直截了当,我想知道如何获得在 XNA 上旋转的纹理的宽度和高度。

【问题讨论】:

  • 我想它与 XNA 上未旋转的纹理的宽度和高度相同
  • 它是一个三角方程。给我一点时间考虑
  • 正是我想要的丹尼尔,谢谢。

标签: c# xna


【解决方案1】:
newWidth = textureHeight * Math.Sin(angle) + textureWidth * Math.Cos(angle);
newHeight = textureHeight * Math.Cos(angle) + textureWidth * Math.Sin(angle);

【讨论】:

    猜你喜欢
    • 2018-09-08
    • 1970-01-01
    • 1970-01-01
    • 2014-06-12
    • 1970-01-01
    • 1970-01-01
    • 2016-12-21
    • 2014-12-31
    • 1970-01-01
    相关资源
    最近更新 更多