Package javax.media.opengl

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


    float cx = center.x;
    float cy = center.y;
    gl.glBegin(GL2.GL_TRIANGLE_FAN);
    gl.glColor4f(color.x, color.y, color.z, .4f);
    for (int i = 0; i < NUM_CIRCLE_POINTS; i++) {
      gl.glVertex3f(x + cx, y + cy, 0);
      // apply the rotation matrix
      float temp = x;
      x = c * x - s * y;
      y = s * temp + c * y;
    }
View Full Code Here


    }
    gl.glEnd();
    gl.glBegin(GL2.GL_LINE_LOOP);
    gl.glColor4f(color.x, color.y, color.z, 1);
    for (int i = 0; i < NUM_CIRCLE_POINTS; i++) {
      gl.glVertex3f(x + cx, y + cy, 0);
      // apply the rotation matrix
      float temp = x;
      x = c * x - s * y;
      y = s * temp + c * y;
    }
View Full Code Here

      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

      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();
  }

  @Override
View Full Code Here

    GL2 gl = panel.getGL().getGL2();
    gl.glPushMatrix();
    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();
  }
View Full Code Here

    gl.glPushMatrix();
    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
View Full Code Here

      } else {
        ParticleColor color = colors[i];
        gl.glColor4b(color.r, color.g, color.b, color.a);
      }
      for (int j = 0; j < NUM_CIRCLE_POINTS; j++) {
        gl.glVertex3f(x + cx, y + cy, 0);
        float temp = x;
        x = c * x - s * y;
        y = s * temp + c * y;
      }
      gl.glEnd();
View Full Code Here

      } else {
        ParticleColor color = colors[i];
        gl.glColor4b(color.r, color.g, color.b, (byte) 127);
      }
      for (int j = 0; j < NUM_CIRCLE_POINTS; j++) {
        gl.glVertex3f(x + cx, y + cy, 0);
        float temp = x;
        x = c * x - s * y;
        y = s * temp + c * y;
      }
      gl.glEnd();
View Full Code Here

       
        gl.glBegin(GL_LINES);
       
        // X-Axis
        gl.glColor3f( 1, 0, 0 );
        gl.glVertex3f( 0, 0, 0 );
        gl.glVertex3f( 50, 0, 0 );

        // Y-Axis
        gl.glColor3f( 0, 1, 0 );
        gl.glVertex3f( 0, 0, 0 );
View Full Code Here

        gl.glBegin(GL_LINES);
       
        // X-Axis
        gl.glColor3f( 1, 0, 0 );
        gl.glVertex3f( 0, 0, 0 );
        gl.glVertex3f( 50, 0, 0 );

        // Y-Axis
        gl.glColor3f( 0, 1, 0 );
        gl.glVertex3f( 0, 0, 0 );
        gl.glVertex3f( 0, 50, 0 );
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.