Fixed to keep existing favorites working in spite of base unit change.
This commit is contained in:
parent
aa3835f0f3
commit
bbc8815148
|
@ -67,6 +67,7 @@ FavoritesList* ReadFavoritesList(istream& in)
|
||||||
Vec3d offset(0.0, 0.0, 0.0);
|
Vec3d offset(0.0, 0.0, 0.0);
|
||||||
favParams->getVector("base", base);
|
favParams->getVector("base", base);
|
||||||
favParams->getVector("offset", offset);
|
favParams->getVector("offset", offset);
|
||||||
|
base *= 1e6;
|
||||||
fav->position = UniversalCoord(Point3d(base.x, base.y, base.z)) + offset;
|
fav->position = UniversalCoord(Point3d(base.x, base.y, base.z)) + offset;
|
||||||
|
|
||||||
// Get orientation
|
// Get orientation
|
||||||
|
@ -114,6 +115,7 @@ void WriteFavoritesList(FavoritesList& favorites, ostream& out)
|
||||||
fav->orientation.getAxisAngle(axis, angle);
|
fav->orientation.getAxisAngle(axis, angle);
|
||||||
|
|
||||||
Point3d base = (Point3d) fav->position;
|
Point3d base = (Point3d) fav->position;
|
||||||
|
base.x *= 1e-6; base.y *= 1e-6; base.z *= 1e-6;
|
||||||
Vec3d offset = fav->position - base;
|
Vec3d offset = fav->position - base;
|
||||||
|
|
||||||
out << '"' << fav->name << "\" {\n";
|
out << '"' << fav->name << "\" {\n";
|
||||||
|
|
Loading…
Reference in a new issue