2017-01-25 5 views
0

とイドと合同リストを持っているスケルトンクラスのリストに保存し、私は今、私は、コントローラをリンクしたい、私はビジュアルシーンノードのinstance_controllerのURL RHEメッシュスローにリンクすることができlibrary_controllersからコントローラを解析します例えばスケルトン:Colladaの骨格とコントローラ関係

<node id="Armature_001" name="Armature_001" type="NODE"> 
    <translate sid="location">0 5 -3.883436</translate> 
    <rotate sid="rotationZ">0 0 1 0</rotate> 
    <rotate sid="rotationY">0 1 0 0</rotate> 
    <rotate sid="rotationX">1 0 0 0</rotate> 
    <scale sid="scale">1 1 1</scale> 
    <node id="Bone" name="Bone" sid="Bone" type="JOINT"> 
     <matrix sid="transform">1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 1</matrix> 
     <node id="Bone_001" name="Bone.001" sid="Bone_001" type="JOINT"> 
     <matrix sid="transform">1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1</matrix> 
     </node> 
    </node> 
    </node> 

とvisual_sceneからメッシュは次のとおりです: visual_sceneライブラリ内のスケルトン部分がある

<node id="Cube" name="Cube" type="NODE"> 
    <translate sid="location">0 0 0</translate> 
    <rotate sid="rotationZ">0 0 1 0</rotate> 
    <rotate sid="rotationY">0 1 0 0</rotate> 
    <rotate sid="rotationX">1 0 0 0</rotate> 
    <scale sid="scale">1 1 1</scale> 
    <instance_controller url="#Armature_001_Cube-skin"> 
     <skeleton>#Bone</skeleton> 
     <bind_material> 
     <technique_common> 
      <instance_material symbol="Material_001-material" target="#Material_001-material"/> 
     </technique_common> 
     </bind_material> 
    </instance_controller> 
    </node> 

とlibrary_controllersからコントローラがある:異なるスケルトンとコントローラを持っている多くのメッシュがある場合

<controller id="Armature_Cube_001-skin" name="Armature"> 
    <skin source="#Cube_001-mesh"> 
    <bind_shape_matrix>1 0 0 0 0 1 0 -5 0 2.78181e-8 3 -1.39091e-7 0 0 0 1</bind_shape_matrix> 
    <source id="Armature_Cube_001-skin-joints"> 
     <Name_array id="Armature_Cube_001-skin-joints-array" count="2">Bone Bone_002</Name_array> 
     <technique_common> 
     <accessor source="#Armature_Cube_001-skin-joints-array" count="2" stride="1"> 
      <param name="JOINT" type="name"/> 
     </accessor> 
     </technique_common> 
    </source> 
    <source id="Armature_Cube_001-skin-bind_poses"> 
     <float_array id="Armature_Cube_001-skin-bind_poses-array" count="32">1 0 0 0 0 0 -1 2.5 0 1 0 5 0 0 0 1 1 0 0 0 0 0 -1 1.5 0 1 0 5 0 0 0 1</float_array> 
     <technique_common> 
     <accessor source="#Armature_Cube_001-skin-bind_poses-array" count="2" stride="16"> 
      <param name="TRANSFORM" type="float4x4"/> 
     </accessor> 
     </technique_common> 
    </source> 
    <source id="Armature_Cube_001-skin-weights"> 
     <float_array id="Armature_Cube_001-skin-weights-array" count="20">1 0.9464464 0.05355352 1 0.9444246 0.05557531 1 0.9444246 0.05557531 1 0.9464464 0.05355352 0.02067142 0.9793285 0.02056819 0.9794319 0.02067142 0.9793285 0.02056819 0.9794319</float_array> 
     <technique_common> 
     <accessor source="#Armature_Cube_001-skin-weights-array" count="20" stride="1"> 
      <param name="WEIGHT" type="float"/> 
     </accessor> 
     </technique_common> 
    </source> 
    <joints> 
     <input semantic="JOINT" source="#Armature_Cube_001-skin-joints"/> 
     <input semantic="INV_BIND_MATRIX" source="#Armature_Cube_001-skin-bind_poses"/> 
    </joints> 
    <vertex_weights count="12"> 
     <input semantic="JOINT" source="#Armature_Cube_001-skin-joints" offset="0"/> 
     <input semantic="WEIGHT" source="#Armature_Cube_001-skin-weights" offset="1"/> 
     <vcount>1 2 1 2 1 2 1 2 2 2 2 2 </vcount> 
     <v>1 0 0 1 1 2 1 3 0 4 1 5 1 6 0 7 1 8 1 9 0 10 1 11 0 12 1 13 0 14 1 15 0 16 1 17 0 18 1 19</v> 
    </vertex_weights> 
    </skin> 
</controller> 

私の質問私は、ID列からコントローラや骨格をリンクさせることができ

答えて

0

AssimpLibを試してみてください、よく、骨格アニメーションでのColladaをサポートし、それはすべてのハードワークを行う

関連する問題