本文整理汇总了C++中QMatrix4x4::operator方法的典型用法代码示例。如果您正苦于以下问题:C++ QMatrix4x4::operator方法的具体用法?C++ QMatrix4x4::operator怎么用?C++ QMatrix4x4::operator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QMatrix4x4
的用法示例。
在下文中一共展示了QMatrix4x4::operator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setWorldTransform
void MotionState::setWorldTransform(QMatrix4x4 m,qreal scaleFactor){
btMatrix3x3 w_rotation(m.operator ()(0,0),m.operator ()(0,1),m.operator ()(0,2),
m.operator ()(1,0),m.operator ()(1,1),m.operator ()(1,2),
m.operator ()(2,0),m.operator ()(2,1),m.operator ()(2,2));
btVector3 w_translation(m.operator ()(0,3)*scaleFactor,m.operator ()(1,3)*scaleFactor,m.operator ()(2,3)*scaleFactor);
btDefaultMotionState::setWorldTransform(btTransform(w_rotation,w_translation));
}
示例2: w_rotation
MotionState::MotionState(const QMatrix4x4 startTrans, const QMatrix4x4 centerOfMassOffset,QObject* parent)
:QObject(parent)
{
btMatrix3x3 w_rotation(startTrans.operator ()(0,0),startTrans.operator ()(0,1),startTrans.operator ()(0,2),
startTrans.operator ()(1,0),startTrans.operator ()(1,1),startTrans.operator ()(1,2),
startTrans.operator ()(2,0),startTrans.operator ()(2,1),startTrans.operator ()(2,2));
btVector3 w_translation(startTrans.operator ()(0,3),startTrans.operator ()(1,3),startTrans.operator ()(2,3));
m_graphicsWorldTrans=btTransform(w_rotation,w_translation);
btMatrix3x3 c_rotation(centerOfMassOffset.operator ()(0,0),centerOfMassOffset.operator ()(0,1),centerOfMassOffset.operator ()(0,2),
centerOfMassOffset.operator ()(1,0),centerOfMassOffset.operator ()(1,1),centerOfMassOffset.operator ()(1,2),
centerOfMassOffset.operator ()(2,0),centerOfMassOffset.operator ()(2,1),centerOfMassOffset.operator ()(2,2));
btVector3 c_translation(centerOfMassOffset.operator ()(0,3),centerOfMassOffset.operator ()(1,3),centerOfMassOffset.operator ()(2,3));
m_centerOfMassOffset=btTransform(c_rotation,c_translation);
m_startWorldTrans=btTransform(m_graphicsWorldTrans);
}