Examples of NextShape


Examples of com.googlecode.jumpnevolve.math.NextShape

public class SpeedTest {

  @Test
  public void testSpeedNewRectCollisions() {
    NextShape rect = ShapeFactory.createRectangle(new Vector(10, 100), 20,
        20);
    // NextShape rect2 = ShapeFactory.createRectangle(new Vector(10, 90),
    // 20,20);
    NextShape rect2 = ShapeFactory.createCircle(new Vector(10, 90), 10);
    Date start = new Date();
    long startTime = start.getTime();
    for (int i = 0; i < 1000000; i++) {
      rect.getCollision(rect2, Vector.ZERO, true, true);
      rect = rect.moveCenter(new Vector(0, 0.000001f));
View Full Code Here

Examples of com.googlecode.jumpnevolve.math.NextShape

  public static void drawScaled(Graphics g, Circle circle, float zoom) {
    draw(g, new Circle(circle.getCenter(), circle.radius * zoom));
  }

  public static void drawScaled(Graphics g, NextShape shape, float zoom) {
    NextShape scaled = shape.scale(zoom);
    draw(g, scaled);
  }
View Full Code Here

Examples of com.googlecode.jumpnevolve.math.NextShape

      // Entsprechend die neue Position berechnen
      Vector newPos = this.shape.getCenter().add(
          this.velocity.mul(this.oldStep));

      // Neues Shape bestimmen
      NextShape newShape = this.shape.modifyCenter(newPos);
      this.oldShape = this.shape;
      this.shape = newShape;

      // Welt informieren
      this.world.changedPosition(this);
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.