本文整理汇总了C++中Matrix3f::setValue方法的典型用法代码示例。如果您正苦于以下问题:C++ Matrix3f::setValue方法的具体用法?C++ Matrix3f::setValue怎么用?C++ Matrix3f::setValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Matrix3f
的用法示例。
在下文中一共展示了Matrix3f::setValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: eulerToMatrix
void eulerToMatrix(FCL_REAL a, FCL_REAL b, FCL_REAL c, Matrix3f& R)
{
FCL_REAL c1 = cos(a);
FCL_REAL c2 = cos(b);
FCL_REAL c3 = cos(c);
FCL_REAL s1 = sin(a);
FCL_REAL s2 = sin(b);
FCL_REAL s3 = sin(c);
R.setValue(c1 * c2, - c2 * s1, s2,
c3 * s1 + c1 * s2 * s3, c1 * c3 - s1 * s2 * s3, - c2 * s3,
s1 * s3 - c1 * c3 * s2, c3 * s1 * s2 + c1 * s3, c2 * c3);
}
示例2: assertNormalized
void Quaternion3f::toRotation(Matrix3f& R) const
{
assertNormalized();
FCL_REAL twoX = 2.0*data[1];
FCL_REAL twoY = 2.0*data[2];
FCL_REAL twoZ = 2.0*data[3];
FCL_REAL twoWX = twoX*data[0];
FCL_REAL twoWY = twoY*data[0];
FCL_REAL twoWZ = twoZ*data[0];
FCL_REAL twoXX = twoX*data[1];
FCL_REAL twoXY = twoY*data[1];
FCL_REAL twoXZ = twoZ*data[1];
FCL_REAL twoYY = twoY*data[2];
FCL_REAL twoYZ = twoZ*data[2];
FCL_REAL twoZZ = twoZ*data[3];
R.setValue(1.0 - (twoYY + twoZZ), twoXY - twoWZ, twoXZ + twoWY,
twoXY + twoWZ, 1.0 - (twoXX + twoZZ), twoYZ - twoWX,
twoXZ - twoWY, twoYZ + twoWX, 1.0 - (twoXX + twoYY));
}