Fix models

This commit is contained in:
Ruben 2016-09-01 17:05:47 +01:00
parent 00059ea085
commit b3c4361409
4 changed files with 414 additions and 98 deletions

View file

@ -42,7 +42,10 @@ class Game
*/ */
private $hits; private $hits;
/** @var float Total score of the game (sum of hits) */ /**
* @ORM\Column
* @var Total score
*/
private $score; private $score;
/** /**
@ -53,6 +56,16 @@ class Game
*/ */
private $createdAt; private $createdAt;
public function __construct()
{
$this->hits = new ArrayCollection();
}
public function addHit(Hit $hit) {
$this->hits->add($hit);
$this->score += $hit->getScore();
}
/** /**
* Gets the value of id. * Gets the value of id.
* *

View file

@ -38,6 +38,7 @@ class Hit
/** /**
* @var float The score this hit resulted in * @var float The score this hit resulted in
* @ORM\Column
*/ */
private $score; private $score;
@ -62,204 +63,493 @@ class Hit
/** /**
* @var boolean * @var boolean
* @ORM\Column
*/ */
private $glasses; private $glasses;
/** @var float Head roll angle */ /**
* @var float Head roll angle
* @ORM\Column
*/
private $roll; private $roll;
/** @var float Head pitch angle */ /**
* @var float Head pitch angle
* @ORM\Column
*/
private $pitch; private $pitch;
/** @var float Head yaw angle */ /**
* @var float Head yaw angle
* @ORM\Column
*/
private $yaw; private $yaw;
/** @var float Distance between two outer eye corners (mm?) */ /**
* @var float Distance between two outer eye corners (mm?)
* @ORM\Column
*/
private $inter_ocular_distance; private $inter_ocular_distance;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $mouth_open; private $mouth_open;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $lip_press; private $lip_press;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $brow_raise; private $brow_raise;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $nose_wrinkler; private $nose_wrinkler;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $lip_depressor; private $lip_depressor;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $brow_furrow; private $brow_furrow;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $attention; private $attention;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $smile; private $smile;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $inner_brow_raiser; private $inner_brow_raiser;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $chin_raiser; private $chin_raiser;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $smirk; private $smirk;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $lip_suck; private $lip_suck;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $upper_lip_raiser; private $upper_lip_raiser;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $lip_pucker; private $lip_pucker;
/** @var float Expression parameter */ /**
* @var float Expression parameter
* @ORM\Column
*/
private $eye_closure; private $eye_closure;
/** @var float 'Expression' parameter */ /**
* @var float 'Expression' parameter
* @ORM\Column
*/
private $engagement; private $engagement;
/** @var float 'Expression' parameter */ /**
* @var float 'Expression' parameter
* @ORM\Column
*/
private $valence; private $valence;
/** @var float Emotion parameter */ /**
* @var float Emotion parameter
* @ORM\Column
*/
private $anger; private $anger;
/** @var float Emotion parameter */ /**
* @var float Emotion parameter
* @ORM\Column
*/
private $contempt; private $contempt;
/** @var float Emotion parameter */ /**
* @var float Emotion parameter
* @ORM\Column
*/
private $disgust; private $disgust;
/** @var float Emotion parameter */ /**
* @var float Emotion parameter
* @ORM\Column
*/
private $fear; private $fear;
/** @var float Emotion parameter */ /**
* @var float Emotion parameter
* @ORM\Column
*/
private $joy; private $joy;
/** @var float Emotion parameter */ /**
* @var float Emotion parameter
* @ORM\Column
*/
private $sadness; private $sadness;
/** @var float Emotion parameter */ /**
* @var float Emotion parameter
* @ORM\Column
*/
private $surprise; private $surprise;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_0x; private $point_0x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_0y; private $point_0y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_1x; private $point_1x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_1y; private $point_1y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_2x; private $point_2x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_2y; private $point_2y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_3x; private $point_3x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_3y; private $point_3y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_4x; private $point_4x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_4y; private $point_4y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_5x; private $point_5x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_5y; private $point_5y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_6x; private $point_6x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_6y; private $point_6y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_7x; private $point_7x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_7y; private $point_7y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_8x; private $point_8x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_8y; private $point_8y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_9x; private $point_9x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_9y; private $point_9y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_10x; private $point_10x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_10y; private $point_10y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_11x; private $point_11x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_11y; private $point_11y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_12x; private $point_12x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_12y; private $point_12y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_13x; private $point_13x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_13y; private $point_13y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_14x; private $point_14x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_14y; private $point_14y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_15x; private $point_15x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_15y; private $point_15y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_16x; private $point_16x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_16y; private $point_16y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_17x; private $point_17x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_17y; private $point_17y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_18x; private $point_18x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_18y; private $point_18y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_19x; private $point_19x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_19y; private $point_19y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_20x; private $point_20x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_20y; private $point_20y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_21x; private $point_21x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_21y; private $point_21y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_22x; private $point_22x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_22y; private $point_22y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_23x; private $point_23x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_23y; private $point_23y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_24x; private $point_24x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_24y; private $point_24y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_25x; private $point_25x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_25y; private $point_25y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_26x; private $point_26x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_26y; private $point_26y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_27x; private $point_27x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_27y; private $point_27y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_28x; private $point_28x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_28y; private $point_28y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_29x; private $point_29x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_29y; private $point_29y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_30x; private $point_30x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_30y; private $point_30y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_31x; private $point_31x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_31y; private $point_31y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_32x; private $point_32x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_32y; private $point_32y;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_33x; private $point_33x;
/** @var float Facial landmark */ /**
* @var float Facial landmark
* @ORM\Column
*/
private $point_33y; private $point_33y;
/* /*
@ -303,9 +593,18 @@ class Hit
*/ */
public function __construct() public function __construct()
{ {
$this->hits = new ArrayCollection(); $this->hits = new ArrayCollection();
} }
/**
* Gets the value of score.
*
* @return float The score this hit resulted in
*/
public function getScore()
{
return $this->score;
}
} }

View file

@ -26,6 +26,7 @@ class Level
/** /**
* Name of the level * Name of the level
* @var string * @var string
* @ORM\Column
*/ */
private $name; private $name;

View file

@ -27,6 +27,7 @@ class Target
/** /**
* Incremental position in level * Incremental position in level
* @var int * @var int
* @ORM\Column
*/ */
private $position; private $position;
@ -38,6 +39,7 @@ class Target
/** /**
* @var float * @var float
* @ORM\Column
*/ */
private $time; private $time;
@ -50,6 +52,7 @@ class Target
/** /**
* Required score * Required score
* @var int * @var int
* @ORM\Column
*/ */
private $score; private $score;