-
-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
Describe the bug
Neighbourhood::computeQuadric are fitting a quadric equation z = c1 + c2x +c3y + c4xx + c5xy + c6 * y*y.
but the code is
//for every points
{
double* _A = A.data();
double* _b = b.data();
for (unsigned i = 0; i < count; ++i)
{
CCVector3 l = toLocalOrientation * (*m_associatedCloud->getPoint(i) - *G);
*_A++ = 1.0;
*_A++ = l.x;
*_A++ = l.y;
*_A = static_cast<double>(l.x)*l.y; //###here is an error ,suppose to be *_A = static_cast<double>(l.x)*l.x;
//by the way, we track the max 'X' squared dimension
lmax2 = std::max(lmax2, *_A);
++_A;
*_A++ = static_cast<double>(l.x)*l.y;
*_A = static_cast<double>(l.y)*l.y;
//by the way, we track the max 'Y' squared dimension
lmax2 = std::max(lmax2, *_A);
++_A;
*_b++ = l.z;
//and don't forget to track the max 'Z' squared dimension as well
lmax2 = std::max(lmax2, static_cast<double>(l.z)*l.z);
}
}
How to reproduce
Expected behaviour
Additional context
Your environment
- CCCoreLib Version (or git hash/tag):
- OS & Version:
- Qt Version (if compiling w/Qt):
- TBB Version (if compiling w/TBB):
Metadata
Metadata
Assignees
Labels
No labels