Changeset 398
- Timestamp:
- 09/29/11 21:19:07 (8 months ago)
- Location:
- cafu/trunk/Libs/Models
- Files:
-
- 2 modified
-
Model_cmdl.cpp (modified) (8 diffs)
-
Model_cmdl.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cafu/trunk/Libs/Models/Model_cmdl.cpp
r396 r398 308 308 309 309 // Allocate the cache space that is needed for drawing. 310 m_ Draw_JointMatrices.PushBackEmpty(m_Joints.Size());310 m_JointMatrices.PushBackEmpty(m_Joints.Size()); 311 311 m_Draw_Meshes.PushBackEmpty(m_Meshes.Size()); 312 312 … … 953 953 if (Super && Super->HasMatrix(JointNr)) 954 954 { 955 m_ Draw_JointMatrices[JointNr]=Super->GetMatrix(JointNr);955 m_JointMatrices[JointNr]=Super->GetMatrix(JointNr); 956 956 continue; 957 957 } … … 960 960 const MatrixT RelMatrix(J.Pos, cf::math::QuaternionfT::FromXYZ(J.Qtr), J.Scale); 961 961 962 m_ Draw_JointMatrices[JointNr]=(J.Parent==-1) ? RelMatrix : m_Draw_JointMatrices[J.Parent]*RelMatrix;962 m_JointMatrices[JointNr]=(J.Parent==-1) ? RelMatrix : m_JointMatrices[J.Parent]*RelMatrix; 963 963 } 964 964 } … … 975 975 if (Super && Super->HasMatrix(JointNr)) 976 976 { 977 m_ Draw_JointMatrices[JointNr]=Super->GetMatrix(JointNr);977 m_JointMatrices[JointNr]=Super->GetMatrix(JointNr); 978 978 continue; 979 979 } … … 1006 1006 const JointT& J=m_Joints[JointNr]; 1007 1007 1008 m_ Draw_JointMatrices[JointNr]=(J.Parent==-1) ? RelMatrix : m_Draw_JointMatrices[J.Parent]*RelMatrix;1008 m_JointMatrices[JointNr]=(J.Parent==-1) ? RelMatrix : m_JointMatrices[J.Parent]*RelMatrix; 1009 1009 } 1010 1010 } … … 1036 1036 const MeshT::WeightT& Weight=Mesh.Weights[Vertex.FirstWeightIdx]; 1037 1037 1038 Vertex.Draw_Pos=m_ Draw_JointMatrices[Weight.JointIdx].Mul_xyz1(Weight.Pos);1038 Vertex.Draw_Pos=m_JointMatrices[Weight.JointIdx].Mul_xyz1(Weight.Pos); 1039 1039 } 1040 1040 else … … 1046 1046 const MeshT::WeightT& Weight=Mesh.Weights[Vertex.FirstWeightIdx+WeightNr]; 1047 1047 1048 Vertex.Draw_Pos+=m_ Draw_JointMatrices[Weight.JointIdx].Mul_xyz1(Weight.Pos) * Weight.Weight;1048 Vertex.Draw_Pos+=m_JointMatrices[Weight.JointIdx].Mul_xyz1(Weight.Pos) * Weight.Weight; 1049 1049 } 1050 1050 } … … 1209 1209 } 1210 1210 1211 return m_ Draw_JointMatrices;1211 return m_JointMatrices; 1212 1212 } 1213 1213 -
cafu/trunk/Libs/Models/Model_cmdl.hpp
r396 r398 68 68 69 69 70 /// A mesh consisting of a material and a list of vertices. 70 /// This struct defines a triangle mesh in the model. 71 /// A mesh essentially consists of a list of triangles whose vertices are composed 72 /// of weighted positions that are attached to the joints of the model. 71 73 struct MeshT 72 74 { … … 352 354 mutable float m_Draw_CachedDataAtFrameNr; ///< The animation frame number at which we have computed the cache data. 353 355 354 mutable ArrayT<MatrixT> m_ Draw_JointMatrices;///< The transformation matrices that represent the pose of the skeleton at the given animation sequence and frame number.355 mutable ArrayT<MatSys::MeshT> m_Draw_Meshes; ///< The draw meshes resulting from m_ Draw_JointMatrices.356 mutable ArrayT<MatrixT> m_JointMatrices; ///< The transformation matrices that represent the pose of the skeleton at the given animation sequence and frame number. 357 mutable ArrayT<MatSys::MeshT> m_Draw_Meshes; ///< The draw meshes resulting from m_JointMatrices. 356 358 }; 357 359
