#include <DebugDrawingManagerMessageHandler.h>
Inheritance diagram for DebugDrawingManagerMessageHandler:
Public Member Functions | |
DebugDrawingManagerMessageHandler (DebugDrawingManager &debugDrawingManager) | |
virtual bool | handleMessage (InMessage &message) |
Private Member Functions | |
void | repaintField () |
Private Attributes | |
DebugDrawingManager & | debugDrawingManager |
DebugDrawing | worldStateFieldDrawing [8] |
DebugDrawing | obstaclesModelFieldDrawing [8] |
DebugDrawing | perceptsFieldDrawing [8] |
RobotPose | robotPoses [8] |
unsigned long | timeWhenLastWorldStateReceived [8] |
unsigned long | timeWhenLastPerceptsReceived [8] |
Player::teamColor | teamColorOfSelectedRobot |
Definition at line 24 of file DebugDrawingManagerMessageHandler.h.
DebugDrawingManagerMessageHandler::DebugDrawingManagerMessageHandler | ( | DebugDrawingManager & | debugDrawingManager | ) |
Constructor
Definition at line 330 of file DebugDrawingManagerMessageHandler.cpp.
References timeWhenLastPerceptsReceived, and timeWhenLastWorldStateReceived.
bool DebugDrawingManagerMessageHandler::handleMessage | ( | InMessage & | message | ) | [virtual] |
Called from a MessageQueue to distribute messages
message | The message that can be read. |
Implements MessageHandler.
Definition at line 18 of file DebugDrawingManagerMessageHandler.cpp.
References DebugDrawing::addShapeFromQueue(), BallModel::communicated, ColorClassImage::convertToImage(), debugDrawingManager, DebugDrawingManager::drawingFinished(), Drawings::drawingOnField, Drawings::drawingOnImage, fromDegrees(), SystemCall::getCurrentSystemTime(), InMessage::getMessageID(), getQueues(), Player::getTeamColor(), SystemCall::getTimeSince(), idDebugColorClassImage, idDebugDrawing, idDebugDrawing2, idDebugDrawingFinished, idDebugImage, idImage, idOracledWorldState, idPercepts, idSpecialPercept, idWorldState, DebugDrawing::imageDrawingID, DebugDrawingManager::imageDrawingManager, ImageDrawingManager::imageYUV, DebugDrawingManager::incompleteDrawing, Drawings::models_freePartOfGoal, Drawings::models_obstacles, Drawings::models_obstaclesField, Drawings::models_obstaclesRadar, DebugDrawingManager::notifyImage(), Drawings::numberOfFieldDrawings, obstaclesModelFieldDrawing, DrawingMethods::paintBallPerceptForImageView(), DrawingMethods::paintEdgesPerceptForImageView(), DrawingMethods::paintFreePartOfGoalModelForImageView(), DrawingMethods::paintFreePartOfGoalPerceptForImageView(), DrawingMethods::paintLandmarksPerceptForImageView(), DrawingMethods::paintLinesPerceptForImageView(), DrawingMethods::paintObstaclesModelForFieldView(), DrawingMethods::paintObstaclesModelForImageView(), DrawingMethods::paintObstaclesModelForRadarView(), DrawingMethods::paintObstaclesPerceptForImageView(), DrawingMethods::paintPerceptCollectionForFieldView(), DrawingMethods::paintPerceptCollectionForRadarView(), DrawingMethods::paintPSDPerceptForImageView(), DrawingMethods::paintSpecialPerceptForFieldView(), DrawingMethods::paintSpecialPerceptForImageView(), DrawingMethods::paintWorldState(), Drawings::percepts_ball, Drawings::percepts_ballFlagsGoalsField, Drawings::percepts_ballFlagsGoalsRadar, Drawings::percepts_edges, Drawings::percepts_flagsGoals, Drawings::percepts_freePartOfGoal, Drawings::percepts_lines, Drawings::percepts_obstacles, Drawings::percepts_psd, Drawings::percepts_special, Drawings::percepts_specialField, perceptsFieldDrawing, Images::rawImage, RECEIVE_PERCEPTS, RECEIVE_WORLDSTATE, repaintField(), DebugDrawing::reset(), robotPoses, Pose2D::rotation, BallModel::seen, DebugDrawingManager::setDebugDrawing(), teamColorOfSelectedRobot, timeWhenLastPerceptsReceived, timeWhenLastWorldStateReceived, Pose2D::translation, Drawings::worldState, worldStateFieldDrawing, and Drawings::worldStateOracle.
Referenced by CMessageHandlerForQueueToGUI::handleMessage().
void DebugDrawingManagerMessageHandler::repaintField | ( | ) | [private] |
Repaints the field in the field view
Definition at line 342 of file DebugDrawingManagerMessageHandler.cpp.
References debugDrawingManager, DebugDrawingManager::fieldLinesDrawing, DebugDrawingManager::fieldPolygonsDrawingBlue, DebugDrawingManager::fieldPolygonsDrawingRed, Player::red, DebugDrawingManager::setDebugDrawing(), and teamColorOfSelectedRobot.
Referenced by handleMessage().
A reference to the debug drawing manager
Definition at line 39 of file DebugDrawingManagerMessageHandler.h.
Referenced by handleMessage(), and repaintField().
Field drawings of the last received obstacles model of each robot
Definition at line 45 of file DebugDrawingManagerMessageHandler.h.
Referenced by handleMessage().
Field drawings of the last received percepts model of each robot
Definition at line 48 of file DebugDrawingManagerMessageHandler.h.
Referenced by handleMessage().
RobotPose DebugDrawingManagerMessageHandler::robotPoses[8] [private] |
The last received robot pose of each robot
Definition at line 51 of file DebugDrawingManagerMessageHandler.h.
Referenced by handleMessage().
The team color of the last message which was received from a selected robot
Definition at line 60 of file DebugDrawingManagerMessageHandler.h.
Referenced by handleMessage(), and repaintField().
unsigned long DebugDrawingManagerMessageHandler::timeWhenLastPerceptsReceived[8] [private] |
The time when the last percepts were received for each robot
Definition at line 57 of file DebugDrawingManagerMessageHandler.h.
Referenced by DebugDrawingManagerMessageHandler(), and handleMessage().
unsigned long DebugDrawingManagerMessageHandler::timeWhenLastWorldStateReceived[8] [private] |
The time when the last world state was received for each robot
Definition at line 54 of file DebugDrawingManagerMessageHandler.h.
Referenced by DebugDrawingManagerMessageHandler(), and handleMessage().
Field drawings of the last received world state of each robot
Definition at line 42 of file DebugDrawingManagerMessageHandler.h.
Referenced by handleMessage().