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 d16ca33f38
commit e6052ef4b4
4 changed files with 31 additions and 3 deletions

View File

@@ -1186,7 +1186,7 @@ int main( int argc, char **argv )
dragger->setActivationModKeyMask(osgGA::GUIEventAdapter::MODKEY_SHIFT);
dragger->addDraggerCallback(new DraggerVolumeTileCallback(tile.get(), tile->getLocator()));
dragger->setMatrix(osg::Matrix::translate(0.5,0.5,0.5)*tile->getLocator()->getTransform());
dragger->applyAppropriateFrontFace(dragger->getOrCreateStateSet());
group->addChild(dragger.get());