TOP

その他
Game Development Diary
Undead Syndrome 開発メモ
日々コレどうしよう2016年以降版



ブラウザゲーム
発火少年の地面焦がし
MAGICAL METEOR SHOWER

メタセコイア備忘録
東日本大震災(Aftermath of the 2011 Tohoku earthquake and tsunami)

ムカゴソフトウェア開発
e-mail:cqp00202@nifty.ne.jp

Matrix 構造体M11 〜 M44 パラメータについて
単位行列
Matrix.Identity プロパティ
//単位行列 Matrix mat = Matrix.Identity;

平行移動
Matrix.CreateTranslation(Vector3) メソッド
public static Matrix CreateTranslation (
Vector3 position //位置
)
Matrix mat = Matrix.CreateTranslation(new Vector3(100f, 200f, 300f));
//■スプライトフォントで描画
spriteBatch.DrawString(font, "X : " + mat.M41.ToString()
, new Vector2(100f, 100f)
, new Color(Color.White.ToVector4()));
spriteBatch.DrawString(font, "Y : " + mat.M42.ToString()
, new Vector2(100f, 140f)
, new Color(Color.White.ToVector4()));
spriteBatch.DrawString(font, "Z : " + mat.M43.ToString()
, new Vector2(100f, 180f)
, new Color(Color.White.ToVector4()));

実行結果


