Scalar fields can now handle large values (with an internal double offset). Their names can also be longer than 255 characters.

This commit is contained in:
Daniel Girardeau-Montaut
2024-11-10 17:32:37 +01:00
parent 8a9112cfd5
commit efab553b92
10 changed files with 68 additions and 61 deletions
+2 -2
View File
@@ -1013,14 +1013,14 @@ CCCoreLib::ScalarField* Tools::RetrieveSF(const ccPointCloud* cloud, const QStri
int sfIdx = -1;
if (caseSensitive)
{
sfIdx = cloud->getScalarFieldIndexByName(qPrintable(sfName));
sfIdx = cloud->getScalarFieldIndexByName(sfName.toStdString());
}
else
{
QString sfNameUpper = sfName.toUpper();
for (unsigned i = 0; i < cloud->getNumberOfScalarFields(); ++i)
{
if (QString(cloud->getScalarField(i)->getName()).toUpper() == sfNameUpper)
if (QString::fromStdString(cloud->getScalarField(i)->getName()).toUpper() == sfNameUpper)
{
sfIdx = static_cast<int>(i);
break;