Merge Master
This commit is contained in:
@@ -333,15 +333,15 @@ void PropertyVectorList::SaveDocFile (Base::Writer &writer) const
|
||||
uint32_t uCt = (uint32_t)getSize();
|
||||
str << uCt;
|
||||
if (!isSinglePrecision()) {
|
||||
for (std::vector<Base::Vector3d>::const_iterator it = _lValueList.begin(); it != _lValueList.end(); ++it) {
|
||||
str << it->x << it->y << it->z;
|
||||
for (const auto & it : _lValueList) {
|
||||
str << it.x << it.y << it.z;
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (std::vector<Base::Vector3d>::const_iterator it = _lValueList.begin(); it != _lValueList.end(); ++it) {
|
||||
float x = (float)it->x;
|
||||
float y = (float)it->y;
|
||||
float z = (float)it->z;
|
||||
for (const auto & it : _lValueList) {
|
||||
float x = (float)it.x;
|
||||
float y = (float)it.y;
|
||||
float z = (float)it.z;
|
||||
str << x << y << z;
|
||||
}
|
||||
}
|
||||
@@ -354,15 +354,15 @@ void PropertyVectorList::RestoreDocFile(Base::Reader &reader)
|
||||
str >> uCt;
|
||||
std::vector<Base::Vector3d> values(uCt);
|
||||
if (!isSinglePrecision()) {
|
||||
for (std::vector<Base::Vector3d>::iterator it = values.begin(); it != values.end(); ++it) {
|
||||
str >> it->x >> it->y >> it->z;
|
||||
for (auto & it : values) {
|
||||
str >> it.x >> it.y >> it.z;
|
||||
}
|
||||
}
|
||||
else {
|
||||
float x,y,z;
|
||||
for (std::vector<Base::Vector3d>::iterator it = values.begin(); it != values.end(); ++it) {
|
||||
for (auto & it : values) {
|
||||
str >> x >> y >> z;
|
||||
it->Set(x, y, z);
|
||||
it.Set(x, y, z);
|
||||
}
|
||||
}
|
||||
setValues(values);
|
||||
@@ -933,20 +933,20 @@ void PropertyPlacementList::SaveDocFile (Base::Writer &writer) const
|
||||
uint32_t uCt = (uint32_t)getSize();
|
||||
str << uCt;
|
||||
if (!isSinglePrecision()) {
|
||||
for (std::vector<Base::Placement>::const_iterator it = _lValueList.begin(); it != _lValueList.end(); ++it) {
|
||||
str << it->getPosition().x << it->getPosition().y << it->getPosition().z
|
||||
<< it->getRotation()[0] << it->getRotation()[1] << it->getRotation()[2] << it->getRotation()[3] ;
|
||||
for (const auto & it : _lValueList) {
|
||||
str << it.getPosition().x << it.getPosition().y << it.getPosition().z
|
||||
<< it.getRotation()[0] << it.getRotation()[1] << it.getRotation()[2] << it.getRotation()[3] ;
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (std::vector<Base::Placement>::const_iterator it = _lValueList.begin(); it != _lValueList.end(); ++it) {
|
||||
float x = (float)it->getPosition().x;
|
||||
float y = (float)it->getPosition().y;
|
||||
float z = (float)it->getPosition().z;
|
||||
float q0 = (float)it->getRotation()[0];
|
||||
float q1 = (float)it->getRotation()[1];
|
||||
float q2 = (float)it->getRotation()[2];
|
||||
float q3 = (float)it->getRotation()[3];
|
||||
for (const auto & it : _lValueList) {
|
||||
float x = (float)it.getPosition().x;
|
||||
float y = (float)it.getPosition().y;
|
||||
float z = (float)it.getPosition().z;
|
||||
float q0 = (float)it.getRotation()[0];
|
||||
float q1 = (float)it.getRotation()[1];
|
||||
float q2 = (float)it.getRotation()[2];
|
||||
float q3 = (float)it.getRotation()[3];
|
||||
str << x << y << z << q0 << q1 << q2 << q3;
|
||||
}
|
||||
}
|
||||
@@ -959,23 +959,23 @@ void PropertyPlacementList::RestoreDocFile(Base::Reader &reader)
|
||||
str >> uCt;
|
||||
std::vector<Base::Placement> values(uCt);
|
||||
if (!isSinglePrecision()) {
|
||||
for (std::vector<Base::Placement>::iterator it = values.begin(); it != values.end(); ++it) {
|
||||
for (auto & it : values) {
|
||||
Base::Vector3d pos;
|
||||
double q0, q1, q2, q3;
|
||||
str >> pos.x >> pos.y >> pos.z >> q0 >> q1 >> q2 >> q3;
|
||||
Base::Rotation rot(q0,q1,q2,q3);
|
||||
it->setPosition(pos);
|
||||
it->setRotation(rot);
|
||||
it.setPosition(pos);
|
||||
it.setRotation(rot);
|
||||
}
|
||||
}
|
||||
else {
|
||||
float x,y,z,q0,q1,q2,q3;
|
||||
for (std::vector<Base::Placement>::iterator it = values.begin(); it != values.end(); ++it) {
|
||||
for (auto & it : values) {
|
||||
str >> x >> y >> z >> q0 >> q1 >> q2 >> q3;
|
||||
Base::Vector3d pos(x, y, z);
|
||||
Base::Rotation rot(q0,q1,q2,q3);
|
||||
it->setPosition(pos);
|
||||
it->setRotation(rot);
|
||||
it.setPosition(pos);
|
||||
it.setRotation(rot);
|
||||
}
|
||||
}
|
||||
setValues(values);
|
||||
|
||||
Reference in New Issue
Block a user