• R/O
  • SSH
  • HTTPS

mmdx: Commit


Commit MetaInfo

Revision859 (tree)
Zeit2011-06-13 22:18:17
Autorwilfrem

Log Message

SlimDX側チューニング

Ändern Zusammenfassung

Diff

--- branches/XNA4/SlimMMDX/Model/SlimMMDModel.cs (revision 858)
+++ branches/XNA4/SlimMMDX/Model/SlimMMDModel.cs (revision 859)
@@ -121,21 +121,19 @@
121121 /// <summary>
122122 /// 表情をモデルに適用
123123 /// </summary>
124- /// <param name="faceManager">表情マネージャ</param>
125- protected override void SetFace(IMMDFaceManager faceManager)
124+ protected override void SetFace()
126125 {
127- MMDFaceManager.ApplyToVertex((MMDFaceManager)faceManager, m_vertex);
126+ MMDFaceManager.ApplyToVertex((MMDFaceManager)FaceManager, m_vertex);
128127 }
129128 /// <summary>
130129 /// スキニング行列をモデルに適用
131130 /// </summary>
132- /// <param name="skinTransforms">スキニング行列</param>
133- protected override void SetBone(Matrix[] skinTransforms)
131+ protected override void SetBone()
134132 {
135133 System.Threading.Tasks.Parallel.For(0, m_vertex.Length,
136134 (i) => {
137135 Vector4 pos;
138- SkinningHelpers.SkinVertex(skinTransforms, m_vertex[i], out pos, out verticesSource[i].Normal);
136+ SkinningHelpers.SkinVertex(BoneManager.SkinTransforms, m_vertex[i], out pos, out verticesSource[i].Normal);
139137 verticesSource[i].Position = new Vector3(pos.X, pos.Y, pos.Z);
140138 }
141139 );
--- branches/XNA4/SlimMMDX/Model/MMDModelPart.cs (revision 858)
+++ branches/XNA4/SlimMMDX/Model/MMDModelPart.cs (revision 859)
@@ -15,6 +15,10 @@
1515 public class MMDModelPart : IMMDModelPart
1616 {
1717 /// <summary>
18+ /// このパーツに関連付けられているモデル
19+ /// </summary>
20+ protected SlimMMDModel model;
21+ /// <summary>
1822 /// エフェクト
1923 /// </summary>
2024 protected Effect effect;
@@ -50,6 +54,14 @@
5054 #region IMMDModelPart メンバー
5155
5256 /// <summary>
57+ /// モデル追加時に呼ばれる
58+ /// </summary>
59+ /// <param name="model">親モデル</param>
60+ public void SetModel(MMDModel model)
61+ {
62+ this.model = (SlimMMDModel)model;
63+ }
64+ /// <summary>
5365 /// エフェクトにマトリックスを適用
5466 /// </summary>
5567 /// <param name="mode">描画モード</param>
Show on old repository browser