add: obj3Lengths->addValue( 6 );
context: int main (int argc, char **argv){  osgInit( argc, argv );    glutInit( &argc, argv );  glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );  int winID = glutCreateWindow("OpenSG");    glutKeyboardFunc(key);  glutVisibilityFunc(vis);  glutReshapeFunc(resize);  glutDisplayFunc(display);         glutMouseFunc(mouse);     glutMotionFunc(motion);     glutIdleFunc(display);    glEnable( GL_DEPTH_TEST );  glEnable( GL_LIGHTING );  glEnable( GL_LIGHT0 );  glClearColor( .1, .6, .2, 1 );  //glCullFace( GL_BACK );  //glEnable( GL_CULL_FACE );  //BEACON  NodePtr beaconNode = Node::create();  GroupPtr beaconCore = Group::create();  beginEditCP( beaconNode );  beaconNode->setCore( beaconCore );  endEditCP( beaconNode );  //TRANSFORM  NodePtr transNode = Node::create();  TransformPtr transCore = Transform::create();  beginEditCP( transNode );  transNode->setCore( transCore );  transNode->addChild( beaconNode );  endEditCP( transNode );  cam_trans = transCore;    //OBJECT0: Plane  objects[0] = makePlane( 3,3, 4,4 );  calcFaceNormals( GeometryPtr::dcast(objects[0]->getCore()) );  normals[0] = getFaceNormals( GeometryPtr::dcast(objects[0]->getCore()), 0.5 );  //OBJECT1: Sphere  objects[1] = makeSphere( 0, 2.5 );  calcFaceNormals( GeometryPtr::dcast(objects[1]->getCore()) );  normals[1] = getFaceNormals( GeometryPtr::dcast(objects[1]->getCore()), 0.5 );  //OBJECT2: Cone  objects[2] = makeCone( 3, 2, 16, true, true );  calcFaceNormals( GeometryPtr::dcast(objects[2]->getCore()) );  normals[2] = getFaceNormals( GeometryPtr::dcast(objects[2]->getCore()), 0.5 );    //OBJECT3: Custom Single Indexed Geometry  objects[3] = Node::create();  GeometryPtr obj3Core= Geometry::create();  GeoIndexUI32Ptr obj3Index = GeoIndexUI32::create();  GeoPosition3f::PtrType obj3Pnts = GeoPosition3f::create();  GeoColor3f::PtrType obj3Colors = GeoColor3f::create();  GeoPTypePtr obj3Types = GeoPType::create();  GeoPLengthPtr obj3Lengths = GeoPLength::create();   beginEditCP( obj3Pnts );  obj3Pnts->addValue( Pnt3f(0, 0,0) );  obj3Pnts->addValue( Pnt3f(1,-1,0) );  obj3Pnts->addValue( Pnt3f(1, 1,0) );    obj3Pnts->addValue( Pnt3f(1, 1,0) );  obj3Pnts->addValue( Pnt3f(1,-1,0) );  obj3Pnts->addValue( Pnt3f(3,-2,1) );  obj3Pnts->addValue( Pnt3f(3, 2,1) );    obj3Pnts->addValue( Pnt3f(3, 2,1) );  obj3Pnts->addValue( Pnt3f(3,-2,1) );  obj3Pnts->addValue( Pnt3f(4, 0,1) );  endEditCP( obj3Pnts );    beginEditCP( obj3Types );  obj3Types->addValue( GL_TRIANGLES );  obj3Types->addValue( GL_QUADS );  obj3Types->addValue( GL_TRIANGLES );  //obj3Types->addValue( GL_TRIANGLE_STRIP );  endEditCP( obj3Types );    beginEditCP( obj3Lengths );  obj3Lengths->addValue( 3 );  obj3Lengths->addValue( 4 );  obj3Lengths->addValue( 3 );    //obj3Lengths->addValue( 6 );  endEditCP( obj3Lengths );     beginEditCP( obj3Colors );  for( UInt32 i=0; i<obj3Pnts->getSize(); ++i )  {	  obj3Colors->addValue( Color3f(.7,.7,.7) );  }  endEditCP( obj3Colors );    beginEditCP( obj3Index );  for( UInt32 i=0; i<obj3Pnts->getSize(); ++i )  {   obj3Index->addValue( i );  }  //obj3Index->addValue( 0 );  //obj3Index->addValue( 1 );  //obj3Index->addValue( 2 );  //obj3Index->addValue( 5 );  //obj3Index->addValue( 6 );  //obj3Index->addValue( 9 );  endEditCP( obj3Index );    beginEditCP( obj3Core );  obj3Core->setIndex( obj3Index );  obj3Core->setPositions( obj3Pnts );  obj3Core->setTypes( obj3Types );  obj3Core->setLengths( obj3Lengths );  obj3Core->setColors( obj3Colors );  endEditCP( obj3Core );    beginEditCP( objects[3] );  objects[3]->setCore( obj3Core );  endEditCP( objects[3] );  calcFaceNormals( GeometryPtr::dcast(objects[3]->getCore()) );  normals[3] = getFaceNormals( GeometryPtr::dcast(objects[3]->getCore()), 0.5 );  //normals[3] = getFaceNormals( GeometryPtr::dcast(objects[0]->getCore()), 0.1 );    //ROOT  root = Node::create();  GroupPtr rootCore = Group::create();  beginEditCP(root);  root->setCore(rootCore);  root->addChild(transNode);  root->addChild(objects[0]);  root->addChild(normals[0]);  activeObj = root->findChild( objects[0] );  activeNorm = root->findChild( normals[0] );  endEditCP(root);    camera = PerspectiveCamera::create();  camera->setBeacon( beaconNode );  camera->setFov( 90 );  camera->setNear( 0.1 );  camera->setFar( 10000 );    SolidBackgroundPtr background = SolidBackground::create();    viewp = Viewport::create();  viewp->setCamera( camera );  viewp->setBackground( background );  viewp->setRoot( root );  viewp->setSize( 0,0, 1,1 );    GLint glVP[4];  glGetIntegerv( GL_VIEWPORT, glVP );    GLUTWindowPtr gwin = GLUTWindow::create();  gwin->setWinID(winID);  gwin->setSize(glVP[2], glVP[3]);    window = gwin;  window->addPort( viewp );  window->init();    drAct = DrawAction::create();    Vec3f pos( 0, 0, 3 );  tball.setMode( Trackball::OSGObject );  tball.setStartPosition( pos, true );  tball.setSum( true );  tball.setTranslationMode( Trackball::OSGFree );    glutMainLoop();  return 0;}