本文整理汇总了C++中base::Matrix4D::rotY方法的典型用法代码示例。如果您正苦于以下问题:C++ Matrix4D::rotY方法的具体用法?C++ Matrix4D::rotY怎么用?C++ Matrix4D::rotY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类base::Matrix4D
的用法示例。
在下文中一共展示了Matrix4D::rotY方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rotateButtonClicked
void TaskProjGroup::rotateButtonClicked(void)
{
if ( multiView && ui ) {
const QObject *clicked = sender();
// Any translation/scale/etc applied here will be ignored, as
// DrawProjGroup::setFrontViewOrientation() only
// uses it to set Direction and XAxisDirection.
Base::Matrix4D m = multiView->viewOrientationMatrix.getValue();
// TODO: Construct these directly
Base::Matrix4D t;
//TODO: Consider changing the vectors around depending on whether we're in First or Third angle mode - might be more intuitive? IR
if ( clicked == ui->butTopRotate ) {
t.rotX(M_PI / -2);
} else if ( clicked == ui->butCWRotate ) {
t.rotY(M_PI / -2);
} else if ( clicked == ui->butRightRotate) {
t.rotZ(M_PI / 2);
} else if ( clicked == ui->butDownRotate) {
t.rotX(M_PI / 2);
} else if ( clicked == ui->butLeftRotate) {
t.rotZ(M_PI / -2);
} else if ( clicked == ui->butCCWRotate) {
t.rotY(M_PI / 2);
}
m *= t;
multiView->setFrontViewOrientation(m);
Gui::Command::updateActive();
}
}
示例2: rotate
PyObject* MeshPy::rotate(PyObject *args)
{
double x,y,z;
if (!PyArg_ParseTuple(args, "ddd",&x,&y,&z))
return NULL;
PY_TRY {
Base::Matrix4D m;
m.rotX(x);
m.rotY(y);
m.rotZ(z);
getMeshObjectPtr()->getKernel().Transform(m);
} PY_CATCH;
Py_Return;
}