Redraw function did not work
Posted: Thu Dec 14, 2017 2:41 am
Hello, Denial
I met a very weird problem which did not occur before. I tried to change the color of points in cloudpoints and hoped that their colors could be changed immediately. However, the reality is that the colors would not be changed immediately. In fact, I should change the option of "Active" in Scalar field and then change it back to make the colors change.
my code is:
Could you tell me how to fix it?
I met a very weird problem which did not occur before. I tried to change the color of points in cloudpoints and hoped that their colors could be changed immediately. However, the reality is that the colors would not be changed immediately. In fact, I should change the option of "Active" in Scalar field and then change it back to make the colors change.
my code is:
Code: Select all
CCLib::ScalarField* temp = cloudpoints->getScalarField(classificationScalar);
unsigned cloudSize = cloudpoints->size();
ccLog::Warning(QString("cloudSize[ %1]").arg(cloudSize));
for (int i = 0; i < static_cast<int>(cloudSize); ++i)
{
temp->setValue(i, 8);
}
m_associatedWin->redraw(false);