<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=MonoGame%E3%81%AE3D%E3%83%A2%E3%83%87%E3%83%AB%E3%82%92%E7%AE%A1%E7%90%86%E6%8F%8F%E7%94%BB%E3%81%99%E3%82%8B%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E4%BD%9C%E3%82%8B</id>
	<title>MonoGameの3Dモデルを管理描画するクラスを作る - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=MonoGame%E3%81%AE3D%E3%83%A2%E3%83%87%E3%83%AB%E3%82%92%E7%AE%A1%E7%90%86%E6%8F%8F%E7%94%BB%E3%81%99%E3%82%8B%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E4%BD%9C%E3%82%8B"/>
	<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=MonoGame%E3%81%AE3D%E3%83%A2%E3%83%87%E3%83%AB%E3%82%92%E7%AE%A1%E7%90%86%E6%8F%8F%E7%94%BB%E3%81%99%E3%82%8B%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E4%BD%9C%E3%82%8B&amp;action=history"/>
	<updated>2026-06-06T11:30:26Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://monobook.org/w/index.php?title=MonoGame%E3%81%AE3D%E3%83%A2%E3%83%87%E3%83%AB%E3%82%92%E7%AE%A1%E7%90%86%E6%8F%8F%E7%94%BB%E3%81%99%E3%82%8B%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E4%BD%9C%E3%82%8B&amp;diff=9376&amp;oldid=prev</id>
		<title>2018年1月30日 (火) 03:26にimported&gt;Administratorによる</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=MonoGame%E3%81%AE3D%E3%83%A2%E3%83%87%E3%83%AB%E3%82%92%E7%AE%A1%E7%90%86%E6%8F%8F%E7%94%BB%E3%81%99%E3%82%8B%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E4%BD%9C%E3%82%8B&amp;diff=9376&amp;oldid=prev"/>
		<updated>2018-01-30T03:26:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2018年1月30日 (火) 03:26時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l51&quot;&gt;51行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;51行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             // BasicEffectの基本設定をDrawメソッドの中で毎回やるのは非常に無駄なので事前に設定しておく。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             // BasicEffectの基本設定をDrawメソッドの中で毎回やるのは非常に無駄なので事前に設定しておく。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             // Androidでは実質的にGeometry &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;あが使えないのでDrawコールの軽量化は重要になる。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             // Androidでは実質的にGeometry &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Instancingの様な技法が使えないのでDrawコールの軽量化は重要になる。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             // (ジオメトリシェーダーに対応したOpenGL ES 3.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;x対応端末が広く普及するのは10年後だろう）&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             // (ジオメトリシェーダーに対応したOpenGL ES 3.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2対応端末が広く普及するのは10年後だろう）&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             // これだけでもショボいAndroid(F-04G)では300モデルでフレームレートが20%くらい違ってくる。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             // これだけでもショボいAndroid(F-04G)では300モデルでフレームレートが20%くらい違ってくる。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             foreach (var mesh in this.Model.Meshes)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             foreach (var mesh in this.Model.Meshes)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Administrator</name></author>
	</entry>
	<entry>
		<id>https://monobook.org/w/index.php?title=MonoGame%E3%81%AE3D%E3%83%A2%E3%83%87%E3%83%AB%E3%82%92%E7%AE%A1%E7%90%86%E6%8F%8F%E7%94%BB%E3%81%99%E3%82%8B%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E4%BD%9C%E3%82%8B&amp;diff=9375&amp;oldid=prev</id>
		<title>2018年1月30日 (火) 03:25にimported&gt;Administratorによる</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=MonoGame%E3%81%AE3D%E3%83%A2%E3%83%87%E3%83%AB%E3%82%92%E7%AE%A1%E7%90%86%E6%8F%8F%E7%94%BB%E3%81%99%E3%82%8B%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E4%BD%9C%E3%82%8B&amp;diff=9375&amp;oldid=prev"/>
		<updated>2018-01-30T03:25:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2018年1月30日 (火) 03:25時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot;&gt;16行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;16行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         public static Dictionary&amp;lt;string, Model&amp;gt; ModelsCache = new Dictionary&amp;lt;string, Model&amp;gt;();&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         public static Dictionary&amp;lt;string, Model&amp;gt; ModelsCache = new Dictionary&amp;lt;string, Model&amp;gt;();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         public Game Game;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         public Game Game;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         public Model Model;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         public Model Model;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         public Matrix[] Bones;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         public Matrix[] Bones;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Administrator</name></author>
	</entry>
	<entry>
		<id>https://monobook.org/w/index.php?title=MonoGame%E3%81%AE3D%E3%83%A2%E3%83%87%E3%83%AB%E3%82%92%E7%AE%A1%E7%90%86%E6%8F%8F%E7%94%BB%E3%81%99%E3%82%8B%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E4%BD%9C%E3%82%8B&amp;diff=9374&amp;oldid=prev</id>
		<title>2018年1月30日 (火) 03:25にimported&gt;Administratorによる</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=MonoGame%E3%81%AE3D%E3%83%A2%E3%83%87%E3%83%AB%E3%82%92%E7%AE%A1%E7%90%86%E6%8F%8F%E7%94%BB%E3%81%99%E3%82%8B%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E4%BD%9C%E3%82%8B&amp;diff=9374&amp;oldid=prev"/>
		<updated>2018-01-30T03:25:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2018年1月30日 (火) 03:25時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l24&quot;&gt;24行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;24行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /// &amp;lt;/summary&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /// &amp;lt;/summary&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         public Vector3 Rotation;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         public Vector3 Rotation;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /// &amp;lt;summary&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /// &amp;lt;summary&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /// 位置&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /// 位置&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Administrator</name></author>
	</entry>
	<entry>
		<id>https://monobook.org/w/index.php?title=MonoGame%E3%81%AE3D%E3%83%A2%E3%83%87%E3%83%AB%E3%82%92%E7%AE%A1%E7%90%86%E6%8F%8F%E7%94%BB%E3%81%99%E3%82%8B%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E4%BD%9C%E3%82%8B&amp;diff=9373&amp;oldid=prev</id>
		<title>imported&gt;Administrator: ページの作成:「MonoGameでの3Dモデルの「表示」について解説しているサイトは多数あるが、「回転」や「位置」について記述しているサイト...」</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=MonoGame%E3%81%AE3D%E3%83%A2%E3%83%87%E3%83%AB%E3%82%92%E7%AE%A1%E7%90%86%E6%8F%8F%E7%94%BB%E3%81%99%E3%82%8B%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E4%BD%9C%E3%82%8B&amp;diff=9373&amp;oldid=prev"/>
		<updated>2018-01-30T03:24:45Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「&lt;a href=&quot;/wiki/MonoGame&quot; class=&quot;mw-redirect&quot; title=&quot;MonoGame&quot;&gt;MonoGame&lt;/a&gt;での3Dモデルの「表示」について解説しているサイトは多数あるが、「回転」や「位置」について記述しているサイト...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[MonoGame]]での3Dモデルの「表示」について解説しているサイトは多数あるが、「回転」や「位置」について記述しているサイトはほとんどないようだ。そもそもモデルと位置情報などを切り離して管理すること自体が馬鹿げているので、それらを管理するクラスを作っておくと捗る。&lt;br /&gt;
&lt;br /&gt;
また、Drawコールの中でBasicEffect周りを毎回設定している記述も多い。[[PC]]のように[[CPU]]が高速な環境では問題にならないのだろうが、[[Android]]などではそれだけで結構な負担になる。Android端末の多くが「[[OpenGL ES 2.0]]」であるため[[Geometry Instancing]]のようなジオメトリシェーダーを使った技術も使えないのでDrawコールを極力軽くする努力が求められる。 &lt;br /&gt;
&lt;br /&gt;
追記：小手先の最適化より自前Modelクラスを実装してメッシュ結合できるようにした方が速そう。なお純正のModelクラスはsealed指定されているので継承できない。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
    using System;&lt;br /&gt;
    using System.Collections.Generic;&lt;br /&gt;
&lt;br /&gt;
    using Microsoft.Xna.Framework;&lt;br /&gt;
    using Microsoft.Xna.Framework.Graphics;&lt;br /&gt;
    using Microsoft.Xna.Framework.Input;&lt;br /&gt;
&lt;br /&gt;
    public class Model3D&lt;br /&gt;
    {&lt;br /&gt;
        public static Dictionary&amp;lt;string, Model&amp;gt; ModelsCache = new Dictionary&amp;lt;string, Model&amp;gt;();&lt;br /&gt;
        public Game Game;&lt;br /&gt;
        public Model Model;&lt;br /&gt;
        public Matrix[] Bones;&lt;br /&gt;
&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// 回転(単位：degree)&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        public Vector3 Rotation;&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// 位置&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        public Vector3 Position;&lt;br /&gt;
&lt;br /&gt;
        public Model3D(Game game, string modelName)&lt;br /&gt;
        {&lt;br /&gt;
            // game&lt;br /&gt;
            this.Game = game;&lt;br /&gt;
&lt;br /&gt;
            // model&lt;br /&gt;
            if (!ModelsCache.ContainsKey(modelName))&lt;br /&gt;
            {&lt;br /&gt;
                var model = game.Content.Load&amp;lt;Model&amp;gt;(modelName);&lt;br /&gt;
                ModelsCache.Add(modelName, model);&lt;br /&gt;
            }&lt;br /&gt;
            this.Model = ModelsCache[modelName];&lt;br /&gt;
&lt;br /&gt;
            // boneを抽出しておく。&lt;br /&gt;
            this.Bones = new Matrix[this.Model.Bones.Count];&lt;br /&gt;
            this.Model.CopyAbsoluteBoneTransformsTo(this.Bones);&lt;br /&gt;
&lt;br /&gt;
            // BasicEffectの基本設定をDrawメソッドの中で毎回やるのは非常に無駄なので事前に設定しておく。&lt;br /&gt;
            // Androidでは実質的にGeometry あが使えないのでDrawコールの軽量化は重要になる。&lt;br /&gt;
            // (ジオメトリシェーダーに対応したOpenGL ES 3.x対応端末が広く普及するのは10年後だろう）&lt;br /&gt;
            // これだけでもショボいAndroid(F-04G)では300モデルでフレームレートが20%くらい違ってくる。&lt;br /&gt;
            foreach (var mesh in this.Model.Meshes)&lt;br /&gt;
            {&lt;br /&gt;
                foreach (BasicEffect effect in mesh.Effects)&lt;br /&gt;
                {&lt;br /&gt;
                    effect.EnableDefaultLighting();&lt;br /&gt;
                    effect.LightingEnabled = true;&lt;br /&gt;
                    effect.PreferPerPixelLighting = true;&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        // Camera引数は「MonoGameのカメラを作る」を参照&lt;br /&gt;
        public void Draw(Camera camera)&lt;br /&gt;
        {&lt;br /&gt;
            var meshes = this.Model.Meshes;&lt;br /&gt;
            var bones  = this.Bones;&lt;br /&gt;
&lt;br /&gt;
            // 回転をMatrixに変換&lt;br /&gt;
            var yaw   = MathHelper.ToRadians(this.Rotation.Y);&lt;br /&gt;
            var pitch = MathHelper.ToRadians(this.Rotation.X);&lt;br /&gt;
            var roll  = MathHelper.ToRadians(this.Rotation.Z); &lt;br /&gt;
            var rotation = Matrix.CreateFromYawPitchRoll(yaw, pitch, roll);&lt;br /&gt;
&lt;br /&gt;
            // 位置をMatrixに変換&lt;br /&gt;
            var postion = Matrix.CreateTranslation(this.Position);&lt;br /&gt;
&lt;br /&gt;
            // この手の定番計算はCameraクラスを作っておくと捗る。&lt;br /&gt;
            var view = camera.View;&lt;br /&gt;
            var projection = camera.Projection;&lt;br /&gt;
          &lt;br /&gt;
            foreach (var mesh in meshes)&lt;br /&gt;
            {&lt;br /&gt;
                // 一般的な四則演算と異なり、行列の乗算除算は順番が重要。&lt;br /&gt;
                // そのため「rotation」と「position」を入れ替えると残念な結果になる。&lt;br /&gt;
                var world = bones[mesh.ParentBone.Index] * rotation * postion;&lt;br /&gt;
&lt;br /&gt;
                foreach (BasicEffect effect in mesh.Effects)&lt;br /&gt;
                {&lt;br /&gt;
                    effect.World = world;&lt;br /&gt;
                    effect.View = view;&lt;br /&gt;
                    effect.Projection = projection;&lt;br /&gt;
                }&lt;br /&gt;
                mesh.Draw();&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 関連項目 ==&lt;br /&gt;
* [[MonoGameのカメラを作る]]&lt;br /&gt;
&lt;br /&gt;
* [[Geometry Instancing]]&lt;br /&gt;
* [[MonoGameで使う3DモデルをFusion360で作成する]]&lt;br /&gt;
* [[MacOS版のMonoGameのPipeline.appで3Dモデルをビルドできない]]&lt;br /&gt;
* [[MonoGameで外部のXNBファイルを読み込む]]&lt;br /&gt;
&lt;br /&gt;
[[category: MonoGame]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Administrator</name></author>
	</entry>
</feed>