Detailed description |
|
A Vector or Matrix which has been defined borrowing memory from somewhere else should never reallocate upon assignment; it should act like a view onto the borrowed data. The following code segment resulted in locAsScalar showing loc's data before assignment, and the correct value after assignment, but loc did not change.
Vector_<Vec3>& loc = locEntry.updValue();
Vector locAsScalar(3*loc.size(), &loc[0][0], true); // share space
locAsScalar = getQ(s);
|
|