52 using namespace RTPROCESSINGLIB;
53 using namespace Eigen;
60 const VectorXi& vecIndices,
65 MatrixXd matSpharaOperator = MatrixXd::Identity(iOperatorDim, iOperatorDim);
67 if(matBaseFct.size() == 0) {
68 qWarning()<<
"[RTPROCESSINGLIB::makeSpharaProjector] Basis function matrix was empty. Returning identity matrix instead.";
69 return matSpharaOperator;
73 MatrixXd matSpharaGradCut = matBaseFct.block(0,0,matBaseFct.rows(),iNBaseFct);
74 MatrixXd matSpharaMultGrad = matSpharaGradCut * matSpharaGradCut.transpose().eval();
80 for(
int i = 0; i<=iSkip; i++) {
81 for(
int r = i; r<vecIndices.rows(); r+=1+iSkip) {
82 for(
int c = i; c<vecIndices.rows(); c+=1+iSkip) {
83 if((r < vecIndices.rows() || c < vecIndices.rows()) && (rowIndex < matSpharaMultGrad.rows() || colIndex < matSpharaMultGrad.cols())) {
84 matSpharaOperator(vecIndices(r),vecIndices(c)) = matSpharaMultGrad(rowIndex,colIndex);
86 qWarning()<<
"RTPROCESSINGLIB::makeSpharaProjector - Index is out of range. Returning identity matrix.";
88 matSpharaOperator = MatrixXd::Identity(iOperatorDim, iOperatorDim);
89 return matSpharaOperator;
102 return matSpharaOperator;