Phoenix2D-Library  0.10
Ball.h
Go to the documentation of this file.
1 /*
2  * Phoenix2D (RoboCup Soccer Simulation 2D League)
3  * Copyright (c) 2013 Ivan Gonzalez
4  *
5  * This file is part of Phoenix2D.
6  *
7  * Phoenix2D is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * Phoenix2D is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with Phoenix2D. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef BALL_H_
22 #define BALL_H_
23 
24 #include <string>
25 #include "Position.h"
26 #include "Vector2D.h"
27 
31 namespace Phoenix
32 {
33 
38 class Ball {
39  double distance;
40  double direction;
41  double distChange;
42  double dirChange;
43  double x;
44  double y;
45  double vx;
46  double vy;
50 public:
51  Ball();
52  Ball(int simulation_time);
53  Ball(std::string position, int simulation_time);
54  Ball(std::string position, int simulation_time, Position player_position, Vector2D player_velocity);
55  ~Ball();
58  bool isInSightRange();
59  void boundTo(Ball* ball);
60  Ball* getBound();
61 };
62 
63 } // End namespace Phoenix
67 #endif /* BALL_H_ */
Ball * getBound()
Definition: Ball.cpp:162
bool in_sight_range
Definition: Ball.h:48
double vx
Definition: Ball.h:45
Ball The Ball lorem Ipsum
Definition: Ball.h:38
Position The Position lorem Ipsum
Definition: Position.h:50
Ball ball
Definition: World.cpp:31
Ball * bound
Definition: Ball.h:49
void boundTo(Ball *ball)
Definition: Ball.cpp:158
Vector2D getVelocity()
Definition: Ball.cpp:150
double direction
Definition: Ball.h:40
bool isInSightRange()
Definition: Ball.cpp:154
double x
Definition: Ball.h:43
double distance
Definition: Ball.h:39
Position getPosition()
Definition: Ball.cpp:146
int simulation_time
Definition: Ball.h:47
double distChange
Definition: Ball.h:41
double y
Definition: Ball.h:44
double dirChange
Definition: Ball.h:42
double vy
Definition: Ball.h:46
Vector2D The Vector2D lorem Ipsum
Definition: Vector2D.h:45