Changeset 398 for cafu/trunk

Show
Ignore:
Timestamp:
09/29/11 21:19:07 (8 months ago)
Author:
Carsten
Message:

Model code:
In order to prepare some upcoming and more exhaustive changes, rename a private member in CafuModelT.

Location:
cafu/trunk/Libs/Models
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • cafu/trunk/Libs/Models/Model_cmdl.cpp

    r396 r398  
    308308 
    309309    // Allocate the cache space that is needed for drawing. 
    310     m_Draw_JointMatrices.PushBackEmpty(m_Joints.Size()); 
     310    m_JointMatrices.PushBackEmpty(m_Joints.Size()); 
    311311    m_Draw_Meshes.PushBackEmpty(m_Meshes.Size()); 
    312312 
     
    953953            if (Super && Super->HasMatrix(JointNr)) 
    954954            { 
    955                 m_Draw_JointMatrices[JointNr]=Super->GetMatrix(JointNr); 
     955                m_JointMatrices[JointNr]=Super->GetMatrix(JointNr); 
    956956                continue; 
    957957            } 
     
    960960            const MatrixT RelMatrix(J.Pos, cf::math::QuaternionfT::FromXYZ(J.Qtr), J.Scale); 
    961961 
    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; 
    963963        } 
    964964    } 
     
    975975            if (Super && Super->HasMatrix(JointNr)) 
    976976            { 
    977                 m_Draw_JointMatrices[JointNr]=Super->GetMatrix(JointNr); 
     977                m_JointMatrices[JointNr]=Super->GetMatrix(JointNr); 
    978978                continue; 
    979979            } 
     
    10061006            const JointT& J=m_Joints[JointNr]; 
    10071007 
    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; 
    10091009        } 
    10101010    } 
     
    10361036                const MeshT::WeightT& Weight=Mesh.Weights[Vertex.FirstWeightIdx]; 
    10371037 
    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); 
    10391039            } 
    10401040            else 
     
    10461046                    const MeshT::WeightT& Weight=Mesh.Weights[Vertex.FirstWeightIdx+WeightNr]; 
    10471047 
    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; 
    10491049                } 
    10501050            } 
     
    12091209    } 
    12101210 
    1211     return m_Draw_JointMatrices; 
     1211    return m_JointMatrices; 
    12121212} 
    12131213 
  • cafu/trunk/Libs/Models/Model_cmdl.hpp

    r396 r398  
    6868 
    6969 
    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. 
    7173    struct MeshT 
    7274    { 
     
    352354    mutable float                 m_Draw_CachedDataAtFrameNr;   ///< The animation frame    number at which we have computed the cache data. 
    353355 
    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. 
    356358}; 
    357359