Robot Devastation
Public Member Functions | Private Attributes | Static Private Attributes | List of all members

Class that represents a target detected. This target is (or should be) associated to a player.

#include <Target.hpp>

Public Member Functions

 Target ()
 Constructs a default, dummy target. (That is invalid for the game, by the way)
 
 Target (int player_id, const Vector2d &pos, const Vector2d &dimensions)
 
int getPlayerId () const
 
void setPlayerId (int id)
 
const Vector2dgetPos () const
 
void setPos (const Vector2d &pos)
 
const Vector2dgetDimensions () const
 
void setDimensions (const Vector2d &dimensions)
 
int getBelief () const
 
bool reduceBelief (int amount)
 
bool resetBelief ()
 

Private Attributes

int player_id
 Id of the player that is represented by this target.
 
Vector2d pos
 Center of the box that bounds this target.
 
Vector2d dimensions
 Height and Width of the box that bounds this target.
 
int belief
 Quantity representing how sure we are that this target can currently be seen by the user's robot.
 

Static Private Attributes

static const int MAX_BELIEF = 100
 

The documentation for this class was generated from the following files: