public void add ( Iterator < AbstractPathElement3F > iterator ) { AbstractPathElement3F element ; while ( iterator . hasNext ( ) ) { element = iterator . next ( ) ; switch ( element . type ) { case MOVE_TO : moveTo ( element . getToX ( ) , element . getToY ( ) , element . getToZ ( ) ) ; break ; case LINE_TO : lineTo ( element . getToX ( ) , element . getToY ( ) , element . getToZ ( ) ) ; break ; case QUAD_TO : quadTo ( element . getCtrlX1 ( ) , element . getCtrlY1 ( ) , element . getCtrlZ1 ( ) , element . getToX ( ) , element . getToY ( ) , element . getToZ ( ) ) ; break ; case CURVE_TO : curveTo ( element . getCtrlX1 ( ) , element . getCtrlY1 ( ) , element . getCtrlZ1 ( ) , element . getCtrlX2 ( ) , element . getCtrlY2 ( ) , element . getCtrlZ2 ( ) , element . getToX ( ) , element . getToY ( ) , element . getToZ ( ) ) ; break ; case CLOSE : closePath ( ) ; break ; default : } } }
Add the elements replied by the iterator into this path .