Beispiel #1
0
        public Skeleton(Bone bone, Skeleton parent)
        {
            m_bone = bone;
            m_parent = parent;
            m_children = null;

            if (m_parent != null)
            {
                m_parent.AddChild(this);
            }
        }
Beispiel #2
0
        //����������ȫ�ֱ任���󴫵ݵ��ӹ����ϡ�
        public void Update(Bone parent)
        {
            if(parent == null)
            {
                m_totalMat = m_mat;
                return;
            }

            Vector2D refPosDiff = m_refPosition - parent.m_refPosition;

            //transform and then rotate
            Matrix3D transMat = Matrix.Transform2D(refPosDiff.X, refPosDiff.Y);

            m_totalMat = Matrix3D.Multiply(parent.m_totalMat, transMat);

            //contact rotate matrix
            m_totalMat = Matrix3D.Multiply(m_totalMat, m_mat);
        }
Beispiel #3
0
 public Skeleton()
 {
     m_parent = null;
     m_bone = new Bone("tmp");
     m_children = null;
 }