本文整理汇总了C++中ofMatrix4x4::makeFromMultiplicationOf方法的典型用法代码示例。如果您正苦于以下问题:C++ ofMatrix4x4::makeFromMultiplicationOf方法的具体用法?C++ ofMatrix4x4::makeFromMultiplicationOf怎么用?C++ ofMatrix4x4::makeFromMultiplicationOf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofMatrix4x4
的用法示例。
在下文中一共展示了ofMatrix4x4::makeFromMultiplicationOf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getLastHeadView
ofMatrix4x4 headTracking::getLastHeadView(ofMatrix4x4 headView)
{
if (!mTracker.isReady()) {
return headView;
}
ofOrientation fooRot = ofGetOrientation();
double rotation = 0.0;
if (fooRot == OF_ORIENTATION_DEFAULT) {
rotation = 0.0;
} else if (fooRot == OF_ORIENTATION_90_LEFT) {
rotation = 90.0;
} else if (fooRot == OF_ORIENTATION_90_RIGHT) {
rotation = 180.0;
} else {
rotation = 270.0;
}
if (fooRot != mDisplayRotation) {
mDisplayRotation = fooRot;
mSensorToDisplay.makeRotationMatrix(
ofQuaternion(0.0, ofVec3f(1, 0, 0), -rotation, ofVec3f(0, 0, 1),
0.0, ofVec3f(0, 1, 0)));
mEkfToHeadTracker.makeRotationMatrix(
ofQuaternion(0.0, ofVec3f(1, 0, 0), rotation, ofVec3f(0, 0, 1),
0.0, ofVec3f(0, 1, 0)));
}
double secondsSinceLastGyroEvent = (ofGetElapsedTimeMicros() -
mLastGyroEventTimeNanos) * 1E-6;
double secondsToPredictForward = secondsSinceLastGyroEvent + 0.0166666666;
mTmpHeadView = mTracker.getPredictedGLMatrix(secondsToPredictForward);
mTmpHeadView2.makeFromMultiplicationOf(mSensorToDisplay, mTmpHeadView);
headView.makeFromMultiplicationOf(mTmpHeadView2, mEkfToHeadTracker);
if (mNeckModelEnabled) {
mTmpHeadView.makeFromMultiplicationOf(mNeckModelTranslation, headView);
mTmpHeadView.translate(ofVec3f(0, 0.075, 0.0));
headView = mTmpHeadView;
}
return headView;
}