Examples of Vertices2D


Examples of com.szuppe.jakub.common.Vertices2D

  public Paddle(PaddleConfig paddleConfig)
  {
    this.paddleConfig = paddleConfig;
    this.speed = new SpeedVector2D(0, 0);
    this.acceleration = new Acceleration2D(0, 0);
    this.verticles = new Vertices2D(paddleConfig.getStartVertices());
  }
View Full Code Here

Examples of com.szuppe.jakub.common.Vertices2D

  public void resetToStartSituation()
  {
    speed.zero();
    acceleration.zero();
    verticles = null;
    verticles = new Vertices2D(paddleConfig.getStartVertices());
  }
View Full Code Here

Examples of com.szuppe.jakub.common.Vertices2D

  /**
   * @return Zbiór wierzchołków.
   */
  public Vertices2D getVerticles()
  {
    return new Vertices2D(verticles);
  }
View Full Code Here

Examples of com.szuppe.jakub.common.Vertices2D

     * wektor prędkości.
     */
    @Override
    public void handle(Collision collision)
    {
      final Vertices2D paddleVertices = paddle.getVerticles();
      double alpha = (ball.getCoordinates().getX() - paddleVertices.getMinX()) / (paddleVertices.getMaxX()-paddleVertices.getMinX());
      if(alpha < 0)
      {
        alpha = 0;
      }
      else if(alpha > 1)
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.