public void visit(GL10 gl){
  if (!visible_)   return;
  gl.glPushMatrix();
  if (grid_ != null && grid_.isActive()) {
    grid_.beforeDraw(gl);
    transformAncestors(gl);
  }
  transform(gl);
  if (children_ != null) {
    for (int i=0; i < children_.size(); ++i) {
      CCNode child=children_.get(i);
      if (child.zOrder_ < 0) {
        child.visit(gl);
      }
 else       break;
    }
  }
  draw(gl);
  if (children_ != null) {
    for (int i=0; i < children_.size(); ++i) {
      CCNode child=children_.get(i);
      if (child.zOrder_ >= 0) {
        child.visit(gl);
      }
    }
  }
  if (grid_ != null && grid_.isActive()) {
    grid_.afterDraw(gl,this);
  }
  gl.glPopMatrix();
}

public void visit ( GL10 gl ) { if ( ! visible_ ) return ; gl . glPushMatrix ( ) ; if ( grid_ != null && grid_ . isActive ( ) ) { grid_ . beforeDraw ( gl ) ; transformAncestors ( gl ) ; } transform ( gl ) ; if ( children_ != null ) { for ( int i = 0 ; i < children_ . size ( ) ; ++ i ) { CCNode child = children_ . get ( i ) ; if ( child . zOrder_ < 0 ) { child . visit ( gl ) ; } else break ; } } draw ( gl ) ; if ( children_ != null ) { for ( int i = 0 ; i < children_ . size ( ) ; ++ i ) { CCNode child = children_ . get ( i ) ; if ( child . zOrder_ >= 0 ) { child . visit ( gl ) ; } } } if ( grid_ != null && grid_ . isActive ( ) ) { grid_ . afterDraw ( gl , this ) ; } gl . glPopMatrix ( ) ; }
recursive method that visit its children and draw them
