Added Dragger::applyAppropriateFrontFace(StateSet*) to make it easy to handle inverted matrices by toggling the FrontFace to sure the correct face is visible.

This commit is contained in:
Robert Osfield
2016-11-11 17:16:40 +00:00
parent 95d450e026
commit 8af48d369c
4 changed files with 31 additions and 3 deletions

View File

@@ -229,7 +229,7 @@ bool Locator::inverted() const
osg::Vec3d xAxis(_transform(0,0), _transform(1,0), _transform(2,0));
osg::Vec3d yAxis(_transform(0,1), _transform(1,1), _transform(2,1));
osg::Vec3d zAxis(_transform(0,2), _transform(1,2), _transform(2,2));
float volume = (xAxis^yAxis)*zAxis;
double volume = (xAxis^yAxis)*zAxis;
return volume<0.0;
}