Package com.szuppe.jakub.common

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


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

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

     * 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

Related Classes of com.szuppe.jakub.common.Vertices2D

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.