本文整理汇总了C++中Matrix4::Row方法的典型用法代码示例。如果您正苦于以下问题:C++ Matrix4::Row方法的具体用法?C++ Matrix4::Row怎么用?C++ Matrix4::Row使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Matrix4
的用法示例。
在下文中一共展示了Matrix4::Row方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DecomposeWorldOriention
void HrTransform::DecomposeWorldOriention(const Quaternion& orientation)
{
m_worldOriention = HrMath::Normalize(orientation);
Matrix4 matOrientation = HrMath::ToMatrix(m_worldOriention);
Vector4 vRight = matOrientation.Row(0);
m_vWorldRight = Vector3(vRight.x(), vRight.y(), vRight.z());
Vector4 vUp = matOrientation.Row(1);
m_vWorldUp = Vector3(vUp.x(), vUp.y(), vUp.z());
Vector4 vForward = matOrientation.Row(2);
m_vWorldForward = Vector3(vForward.x(), vForward.y(), vForward.z());
}
示例2: DotProduct
float Matrix4::Determinant() const
{
// The determinant is the dot product of:
// the first row and the first row of cofactors
// which is the first col of the adjoint matrix
Matrix4 cofactor;
Cofactor( &cofactor );
Vector3F rowOfCofactor, rowOfThis;
cofactor.Row( 0, &rowOfCofactor );
Row( 0, &rowOfThis );
return DotProduct( rowOfCofactor, rowOfThis );
}