Package ch.blackspirit.graphics

Examples of ch.blackspirit.graphics.Line


    GL2 gl = drawable.getGL().getGL2();
    Vector2f p;
    if(useColor) {
      Color4f c;
      for(int i = 0; i < lines.length; i++) {
        Line l = lines[i];
        if(l == null) continue;

        p = l.getPoint(0);
        c = l.getColor(0);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
          gl.glVertex2f(p.x, p.y);
 
          p = l.getPoint(1);
        c = l.getColor(1);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
          gl.glVertex2f(p.x, p.y);
      }
      // reset color;
      applyColor();
    } else {
      for(int i = 0; i < lines.length; i++) {
        Line l = lines[i];
        if(l == null) continue;

        p = l.getPoint(0);
          gl.glVertex2f(p.x, p.y);
         
          p = l.getPoint(1);
          gl.glVertex2f(p.x, p.y);
      }
    }
  }
View Full Code Here


    GL gl = drawable.getGL();
    Vector2f p;
    if(useColor) {
      Color4f c;
      for(int i = 0; i < lines.length; i++) {
        Line l = lines[i];
        if(l == null) continue;

        p = l.getPoint(0);
        c = l.getColor(0);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
          gl.glVertex2f(p.x, p.y);
 
          p = l.getPoint(1);
        c = l.getColor(1);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
          gl.glVertex2f(p.x, p.y);
      }
      // reset color;
      applyColor();
    } else {
      for(int i = 0; i < lines.length; i++) {
        Line l = lines[i];
        if(l == null) continue;

        p = l.getPoint(0);
          gl.glVertex2f(p.x, p.y);
         
          p = l.getPoint(1);
          gl.glVertex2f(p.x, p.y);
      }
    }
  }
View Full Code Here

TOP

Related Classes of ch.blackspirit.graphics.Line

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.