Package javax.media.opengl

Examples of javax.media.opengl.GL2.glEnd()


      // apply the rotation matrix
      float temp = x;
      x = c * x - s * y;
      y = s * temp + c * y;
    }
    gl.glEnd();
    gl.glBegin(GL2.GL_LINES);
    gl.glVertex3f(cx, cy, 0);
    gl.glVertex3f(cx + axis.x * radius, cy + axis.y * radius, 0);
    gl.glEnd();
    gl.glPopMatrix();
View Full Code Here


    }
    gl.glEnd();
    gl.glBegin(GL2.GL_LINES);
    gl.glVertex3f(cx, cy, 0);
    gl.glVertex3f(cx + axis.x * radius, cy + axis.y * radius, 0);
    gl.glEnd();
    gl.glPopMatrix();
  }

  @Override
  public void drawSegment(Vec2 p1, Vec2 p2, Color3f color) {
View Full Code Here

    transformViewport(gl, zero);
    gl.glBegin(GL2.GL_LINES);
    gl.glColor3f(color.x, color.y, color.z);
    gl.glVertex3f(p1.x, p1.y, 0);
    gl.glVertex3f(p2.x, p2.y, 0);
    gl.glEnd();
    gl.glPopMatrix();
  }

  @Override
  public void drawParticles(Vec2[] centers, float radius, ParticleColor[] colors, int count) {
View Full Code Here

        gl.glVertex3f(x + cx, y + cy, 0);
        float temp = x;
        x = c * x - s * y;
        y = s * temp + c * y;
      }
      gl.glEnd();
    }
    gl.glPopMatrix();
  }


View Full Code Here

        gl.glVertex3f(x + cx, y + cy, 0);
        float temp = x;
        x = c * x - s * y;
        y = s * temp + c * y;
      }
      gl.glEnd();
    }
    gl.glPopMatrix();
  }

  private final Vec2 temp = new Vec2();
View Full Code Here

    temp2.x = xf.p.x + -k_axisScale * xf.q.s;
    temp2.y = xf.p.y + k_axisScale * xf.q.c;
    getWorldToScreenToOut(temp2, temp2);
    gl.glVertex2f(temp.x, temp.y);
    gl.glVertex2f(temp2.x, temp2.y);
    gl.glEnd();
  }

  @Override
  public void drawString(float x, float y, String s, Color3f color) {
    text.beginRendering(panel.getWidth(), panel.getHeight());
View Full Code Here

    Vec2 vec = getWorldToScreen(argPoint);
    GL2 gl = panel.getGL().getGL2();
    gl.glPointSize(argRadiusOnScreen);
    gl.glBegin(GL2.GL_POINTS);
    gl.glVertex2f(vec.x, vec.y);
    gl.glEnd();
  }

  private final Vec2 zero = new Vec2();

  @Override
View Full Code Here

    gl.glColor4f(color.x, color.y, color.z, 1f);
    for (int i = 0; i < vertexCount; i++) {
      Vec2 v = vertices[i];
      gl.glVertex2f(v.x, v.y);
    }
    gl.glEnd();
    gl.glPopMatrix();
  }

  @Override
  public void drawSolidPolygon(Vec2[] vertices, int vertexCount, Color3f color) {
View Full Code Here

        // Z-Axis
        gl.glColor3f( 0, 0, 1 );
        gl.glVertex3f( 0, 0, 0 );
        gl.glVertex3f( 0, 0, 50 );
       
        gl.glEnd();
       
        //# Draw number 50 on x/y-axis line.
        //glRasterPos2f(50,-5)
        //glutInit()
        //A = 53
View Full Code Here

            gl.glColor3ub(color[0], color[1], color[2]);
            gl.glVertex3d(this.workCoord.x, this.workCoord.y, this.workCoord.z);
            gl.glColor3ub(color[0], color[1], color[2]);
            gl.glVertex3d(this.workCoord.x, this.workCoord.y, this.workCoord.z+(1.0/this.scaleFactor));
           
        gl.glEnd();
    }
   
    /**
     * Render the GCode object.
     */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.