D
Drawknob
Changing the ordering of the resizes below gives me different results--
if it's this way it works, if I swap some lines, it results in
corrupted data.
All arrays start off at size 0 except tuftGuides, which has some data
and I expand it here. I read on the Web that resize() to larger size
adds elements while keeping the existing ones--but this is not
happening depending on how I order the below
The vectors hold either floats or structs of several floats, where the
structs have default and copy constructors and assignment operators
defined and working fine.
There's no issue in Debug build. I'm using Visual Studio 2008.
There's no exception thrown. A few of the vectors are class members,
and the other few are local to the function.
try
{
tuftGuides.resize(numTufts * LAYERS);
invTuftSz.resize(numTufts);
sineFactors.resize(numTufts);
hairSecs.resize(numHairs * LAYERS);
hairDia.resize(numHairs * LAYERS);
hairOffsets.resize(numHairs * LAYERS);
nears.resize(numHairs);
}
catch (...)
......
What do I do?
if it's this way it works, if I swap some lines, it results in
corrupted data.
All arrays start off at size 0 except tuftGuides, which has some data
and I expand it here. I read on the Web that resize() to larger size
adds elements while keeping the existing ones--but this is not
happening depending on how I order the below
The vectors hold either floats or structs of several floats, where the
structs have default and copy constructors and assignment operators
defined and working fine.
There's no issue in Debug build. I'm using Visual Studio 2008.
There's no exception thrown. A few of the vectors are class members,
and the other few are local to the function.
try
{
tuftGuides.resize(numTufts * LAYERS);
invTuftSz.resize(numTufts);
sineFactors.resize(numTufts);
hairSecs.resize(numHairs * LAYERS);
hairDia.resize(numHairs * LAYERS);
hairOffsets.resize(numHairs * LAYERS);
nears.resize(numHairs);
}
catch (...)
......
What do I do?