Merge pull request #673 from Dyuzz/patch-1
add Vec3dArray* vertex output to avoid inaccuracy
This commit is contained in:
commit
22b1ec8fda
@ -69,6 +69,18 @@ class ValueVisitor : public osg::ValueVisitor {
|
|||||||
if (_applyMatrix) v = (_isNormal) ? (v * _m) - _origin : v * _m;
|
if (_applyMatrix) v = (_isNormal) ? (v * _m) - _origin : v * _m;
|
||||||
_fout << v[0] << ' ' << v[1] << ' ' << v[2];
|
_fout << v[0] << ' ' << v[1] << ' ' << v[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//add Vec3dArray* vertex output to avoid inaccuracy
|
||||||
|
virtual void apply(osg::Vec3d & inv)
|
||||||
|
{
|
||||||
|
osg::Vec3d v(inv[0], inv[1], inv[2]);
|
||||||
|
osg::Vec3d orign_d((double)_origin.x(), (double)_origin.y(), (double)_origin.z());
|
||||||
|
if (_applyMatrix) v = (_isNormal) ? (v * _m) - orign_d : v * _m;
|
||||||
|
|
||||||
|
//Setting 10-digit Significant Number
|
||||||
|
_fout.precision(10);
|
||||||
|
_fout << v[0] << ' ' << v[1] << ' ' << v[2];
|
||||||
|
}
|
||||||
private:
|
private:
|
||||||
|
|
||||||
ValueVisitor& operator = (const ValueVisitor&) { return *this; }
|
ValueVisitor& operator = (const ValueVisitor&) { return *this; }
|
||||||
|
Loading…
Reference in New Issue
Block a user