本文整理汇总了C++中Matrix4f::Get方法的典型用法代码示例。如果您正苦于以下问题:C++ Matrix4f::Get方法的具体用法?C++ Matrix4f::Get怎么用?C++ Matrix4f::Get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Matrix4f
的用法示例。
在下文中一共展示了Matrix4f::Get方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
Matrix4f Matrix4f::operator*(const Matrix4f matrix2)
{
return Matrix4f(
//First row of the new matrix.
(m_matrix[0][0] * matrix2.Get(0,0)) + (m_matrix[1][0] * matrix2.Get(0,1)) + (m_matrix[2][0] * matrix2.Get(0,2)) + (m_matrix[3][0] * matrix2.Get(0,3)),
(m_matrix[0][0] * matrix2.Get(1,0)) + (m_matrix[1][0] * matrix2.Get(1,1)) + (m_matrix[2][0] * matrix2.Get(1,2)) + (m_matrix[3][0] * matrix2.Get(1,3)),
(m_matrix[0][0] * matrix2.Get(2,0)) + (m_matrix[1][0] * matrix2.Get(2,1)) + (m_matrix[2][0] * matrix2.Get(2,2)) + (m_matrix[3][0] * matrix2.Get(2,3)),
(m_matrix[0][0] * matrix2.Get(3,0)) + (m_matrix[1][0] * matrix2.Get(3,1)) + (m_matrix[2][0] * matrix2.Get(3,2)) + (m_matrix[3][0] * matrix2.Get(3,3)),
//Second row of the new matrix.
(m_matrix[0][1] * matrix2.Get(0,0)) + (m_matrix[1][1] * matrix2.Get(0,1)) + (m_matrix[2][1] * matrix2.Get(0,2)) + (m_matrix[3][1] * matrix2.Get(0,3)),
(m_matrix[0][1] * matrix2.Get(1,0)) + (m_matrix[1][1] * matrix2.Get(1,1)) + (m_matrix[2][1] * matrix2.Get(1,2)) + (m_matrix[3][1] * matrix2.Get(1,3)),
(m_matrix[0][1] * matrix2.Get(2,0)) + (m_matrix[1][1] * matrix2.Get(2,1)) + (m_matrix[2][1] * matrix2.Get(2,2)) + (m_matrix[3][1] * matrix2.Get(2,3)),
(m_matrix[0][1] * matrix2.Get(3,0)) + (m_matrix[1][1] * matrix2.Get(3,1)) + (m_matrix[2][1] * matrix2.Get(3,2)) + (m_matrix[3][1] * matrix2.Get(3,3)),
//Third row of the new matrix.
(m_matrix[0][2] * matrix2.Get(0,0)) + (m_matrix[1][2] * matrix2.Get(0,1)) + (m_matrix[2][2] * matrix2.Get(0,2)) + (m_matrix[3][2] * matrix2.Get(0,3)),
(m_matrix[0][2] * matrix2.Get(1,0)) + (m_matrix[1][2] * matrix2.Get(1,1)) + (m_matrix[2][2] * matrix2.Get(1,2)) + (m_matrix[3][2] * matrix2.Get(1,3)),
(m_matrix[0][2] * matrix2.Get(2,0)) + (m_matrix[1][2] * matrix2.Get(2,1)) + (m_matrix[2][2] * matrix2.Get(2,2)) + (m_matrix[3][2] * matrix2.Get(2,3)),
(m_matrix[0][2] * matrix2.Get(3,0)) + (m_matrix[1][2] * matrix2.Get(3,1)) + (m_matrix[2][2] * matrix2.Get(3,2)) + (m_matrix[3][2] * matrix2.Get(3,3)),
//Fourth row of the new matrix.
(m_matrix[0][3] * matrix2.Get(0,0)) + (m_matrix[1][3] * matrix2.Get(0,1)) + (m_matrix[2][3] * matrix2.Get(0,2)) + (m_matrix[3][3] * matrix2.Get(0,3)),
(m_matrix[0][3] * matrix2.Get(1,0)) + (m_matrix[1][3] * matrix2.Get(1,1)) + (m_matrix[2][3] * matrix2.Get(1,2)) + (m_matrix[3][3] * matrix2.Get(1,3)),
(m_matrix[0][3] * matrix2.Get(2,0)) + (m_matrix[1][3] * matrix2.Get(2,1)) + (m_matrix[2][3] * matrix2.Get(2,2)) + (m_matrix[3][3] * matrix2.Get(2,3)),
(m_matrix[0][3] * matrix2.Get(3,0)) + (m_matrix[1][3] * matrix2.Get(3,1)) + (m_matrix[2][3] * matrix2.Get(3,2)) + (m_matrix[3][3] * matrix2.Get(3,3))
);
}