Package org.jbox2d.particle

Examples of org.jbox2d.particle.ParticleColor


      Vec2 center = centers[i];
      Color color;
      if (colors == null) {
        color = pcolorA;
      } else {
        ParticleColor c = colors[i];
        color = cpool.getColor(c.r * 1f / 127, c.g * 1f / 127, c.b * 1f / 127, c.a * 1f / 127);
      }
      AffineTransform old = g.getTransform();
      g.translate(center.x, center.y);
      g.scale(radius, radius);
View Full Code Here


      Color color;
      // No alpha channel, it slows everything down way too much.
      if (colors == null) {
        color = pcolor;
      } else {
        ParticleColor c = colors[i];
        color = new Color(c.r * 1f / 127, c.g * 1f / 127, c.b * 1f / 127, 1);
      }
      AffineTransform old = g.getTransform();
      g.translate(center.x, center.y);
      g.scale(radius, radius);
View Full Code Here

      float cy = center.y;
      gl.glBegin(GL2.GL_TRIANGLE_FAN);
      if (colors == null) {
        gl.glColor4f(1, 1, 1, .4f);
      } 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;
View Full Code Here

      float cy = center.y;
      gl.glBegin(GL2.GL_LINE_LOOP);
      if (colors == null) {
        gl.glColor4f(1, 1, 1, 1);
      } 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;
View Full Code Here

TOP

Related Classes of org.jbox2d.particle.ParticleColor

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.