From Andreas Henne, "in my application I use the TrackballDragger, the ScaleAxisDragger and the TranslateAxisDragger. Unfortunately these draggers are very thin and they do not provide methods to change their visual appearance. Another problem that I noticed is that lighting on the cones and boxes of the TranslateAxisDragger and ScaleAxisDragger is incorrect when the draggers are scaled due to not normalized normals. This small patch adresses these problems, providing methods to make the draggers thicker. I have attached a zip archive containing the corresponding files and also a modified osgManipulator example that makes use of the modifications. I don't want to retain any copyright."

This commit is contained in:
Robert Osfield
2013-10-18 07:31:22 +00:00
parent a97e092619
commit 49625a1baf
10 changed files with 215 additions and 55 deletions

View File

@@ -9,4 +9,6 @@ REGISTER_OBJECT_WRAPPER( osgManipulator_ScaleAxisDragger,
"osg::Object osg::Node osg::Transform osg::MatrixTransform osgManipulator::Dragger "
"osgManipulator::ScaleAxisDragger" ) // No need to contain CompositeDragger here
{
ADD_FLOAT_SERIALIZER(AxisLineWidth, 2.0f);
ADD_FLOAT_SERIALIZER(BoxSize, 0.05f);
}

View File

@@ -9,4 +9,6 @@ REGISTER_OBJECT_WRAPPER( osgManipulator_TrackballDragger,
"osg::Object osg::Node osg::Transform osg::MatrixTransform osgManipulator::Dragger "
"osgManipulator::TrackballDragger" ) // No need to contain CompositeDragger here
{
ADD_FLOAT_SERIALIZER(AxisLineWidth, 2.0f);
ADD_FLOAT_SERIALIZER(PickCylinderHeight, 0.15f);
}

View File

@@ -9,4 +9,7 @@ REGISTER_OBJECT_WRAPPER( osgManipulator_TranslateAxisDragger,
"osg::Object osg::Node osg::Transform osg::MatrixTransform osgManipulator::Dragger "
"osgManipulator::TranslateAxisDragger" ) // No need to contain CompositeDragger here
{
ADD_FLOAT_SERIALIZER(AxisLineWidth, 2.0f);
ADD_FLOAT_SERIALIZER(PickCylinderRadius, 0.015f);
ADD_FLOAT_SERIALIZER(ConeHeight, 0.1f);
}