Package com.szuppe.jakub.common

Examples of com.szuppe.jakub.common.Ray2D


   * @return Lista kolizji między platformą a piłką.
   */
  public List<Collision> checkCollisionsWithBall(Ball ball)
  {
    final List<Collision> collisionList = new LinkedList<>();
    final Ray2D ballMovementRay = ball.getMovementRay();
    final SpeedVector2D ballSpeed = ball.getSpeed();
    final float radius = ball.getRadius();
    final List<Coordinates2D> verticesList = verticles.getVerticesList();

    try
View Full Code Here


   */
  public Ray2D getMovementRay()
  {
    Coordinates2D start = new Coordinates2D(coordinates);
    Coordinates2D end = coordinates.moveAlongVector(speed.countDisplacement(1000));
    return new Ray2D(start, end);
  }
View Full Code Here

    TreeSet<Collision> collisionList = new TreeSet<>();
    List<LineSegment2D> brickLineSegments = getBrickWithCirleCollisionLineSegments(ball
        .getRadius());
    Side sides[] = { Side.BOTTOM, Side.RIGHT, Side.TOP, Side.LEFT, Side.CORNER,
        Side.CORNER, Side.CORNER, Side.CORNER };
    Ray2D ballMovementRay = ball.getMovementRay();
    SpeedVector2D ballSpeed = ball.getSpeed();
    Coordinates2D pointOfIntersection;
    for (LineSegment2D brickLineSegment : brickLineSegments)
    {
      try
View Full Code Here

TOP

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

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.