01 // Add new dots to the scene 02 void newDot(SoQtRenderArea *renderArea, const SbVec3f dot) 03 { 04 // Pointer to other nodes in the graph 05 SoGroup *root = (SoGroup *) renderArea->getSceneGraph(); 06 SoCoordinate3 *dotCoordinates = (SoCoordinate3 *) root ->getChild(2); 07 SoDotSet *dots = (SoDotSet *) root->getChild(3); 08 09 // Add coordinates 10 dotCoordinates->dot.set1Value(dotCoordinates->dot.getNum(), dot); 11 // Get the dot node to draw all the coordinates 12 dots->numDots.setValue(dotCoordinates->dot.getNum()); 13 }