/** \fn configure */ bool removePlaneFilter::configure(void) { diaElemToggle planeY(&(config.keepY),QT_TRANSLATE_NOOP("removeplane","Keep Y Plane"),QT_TRANSLATE_NOOP("removeplane","Process luma plane")); diaElemToggle planeU(&(config.keepU),QT_TRANSLATE_NOOP("removeplane","Keep U Plane"),QT_TRANSLATE_NOOP("removeplane","Process chromaU plane")); diaElemToggle planeV(&(config.keepV),QT_TRANSLATE_NOOP("removeplane","Keep V Plane"),QT_TRANSLATE_NOOP("removeplane","Process chromaV plane")); diaElem *elems[3]={&planeY,&planeU,&planeV}; return diaFactoryRun(QT_TRANSLATE_NOOP("removeplane","Remove plane"),3,elems); }
//----------------------------------------------------------------------------------------- Plane CObjectSelectTool::GetGizmoTranslationPlane(Ray &pickRay) { Quaternion qOrient = GetEditor()->GetSceneManager()->getRootSceneNode()->getOrientation(); Vector3 vPos = mLastSelectedEntity->getParentSceneNode()->getPosition(); Vector3 vCamBack = GetEditor()->GetCamera()->getDerivedDirection(); vCamBack = -vCamBack; if(!mLockedAxis) return Plane(vCamBack,vPos); Plane planeX(qOrient.xAxis(), vPos); Plane planeY(qOrient.yAxis(), vPos); Plane planeZ(qOrient.zAxis(), vPos); float vX = planeX.projectVector(pickRay.getDirection()).length(); float vY = planeY.projectVector(pickRay.getDirection()).length(); float vZ = planeZ.projectVector(pickRay.getDirection()).length(); if(mLockedAxis & AXIS_X) vX = 10000.0f; if(mLockedAxis & AXIS_Y) vY = 10000.0f; if(mLockedAxis & AXIS_Z) vZ = 10000.0f; if (vX < vY && vX < vZ) return planeX; else { if (vY < vX && vY < vZ ) return planeY; else return planeZ; } }