add: case 'd': if(SceneFileHandler::the().write(root, "volume.osb", true)) std::cerr << "Wrote volume.osb" << std::endl; break;
context: void key(unsigned char key, int x, int y){  switch ( key )    {    case 27:    osgExit(); exit(0);          case 'b':      cullFace = !cullFace;      if (cullFace)        glEnable(GL_CULL_FACE);      else        glDisable(GL_CULL_FACE);      std::cout << "cullFace: " << cullFace << std::endl;      break;    case 's':          case 'S':      {        float f = (key == 's') ? 0.9 : 1.1;        sliceDistance *= f;        beginEditCP(slicesCore);        {          slicesCore->setSliceDistance(sliceDistance);        }        endEditCP(slicesCore);        std::cout << "sliceDistance: " << sliceDistance << std::endl;        std::cout << "obj size:      " << size.x() << "x" 		                       << size.y() << "x" 				       << size.z() << std::endl;      }      break;    case 'q':                     beginEditCP(slicesCore);                {                  Real32 s = size.length();                  slicesCore->setSize(Vec3f(s,s,s));                }                endEditCP(slicesCore);                break;                      case 'w':                     beginEditCP(slicesCore);                {                  slicesCore->setSize(size);                }                endEditCP(slicesCore);                break;                      case 'p':   {                std::ofstream outFileStream( "test.osg" );                OSGWriter writer( outFileStream, 2 );                writer.write( root );                std::cerr << "File dumped." << std::endl;                }                break;                      case 'a':   // Additive blending                if(blendChunkPtr->getDestFactor() == GL_ONE_MINUS_SRC_ALPHA)                {                    beginEditCP (blendChunkPtr);                    {                      blendChunkPtr->setSrcFactor  ( GL_SRC_ALPHA           );                      blendChunkPtr->setDestFactor ( GL_ONE );                    }                    endEditCP   (blendChunkPtr);                }                else                {                    beginEditCP (blendChunkPtr);                    {                      blendChunkPtr->setSrcFactor  ( GL_SRC_ALPHA           );                      blendChunkPtr->setDestFactor ( GL_ONE_MINUS_SRC_ALPHA );                    }                    endEditCP   (blendChunkPtr);                }                break;                    case 'L':   glDisable( GL_LIGHTING );      std::cerr << "Lighting disabled." << std::endl;      break;    case 'l':   glEnable( GL_LIGHTING );      std::cerr << "Lighting enabled." << std::endl;      break;    case 'z':   glPolygonMode( GL_FRONT_AND_BACK, GL_POINT);      std::cerr << "PolygonMode: Point." << std::endl;      break;    case 'x':   glPolygonMode( GL_FRONT_AND_BACK, GL_LINE);      std::cerr << "PolygonMode: Line." << std::endl;      break;    case 'c':   glPolygonMode( GL_FRONT_AND_BACK, GL_FILL);      std::cerr << "PolygonMode: Fill." << std::endl;      break;    case 'r':   std::cerr << "Sending ray through " << x << "," << y << std::endl;      Line l;      cam->calcViewRay( l, x, y, *vp );      std::cerr << "From " << l.getPosition() << ", dir " << l.getDirection() << std::endl;      break;    }}