Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Tools/Debugging/DebugDrawings.h File Reference

Macros for drawing. More...

#include "Tools/Debugging/Debugging.h"
#include "Tools/Debugging/DebugKeyTable.h"

Include dependency graph for DebugDrawings.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class  Drawings
 This class includes all enumeration types and methods that are necessary to transmit messages for debug drawings. More...


Defines

#define CIRCLE(id, center_x, center_y, radius, penWidth, penStyle, penColor)
 A macro that sends a circle.

#define DOT(id, x, y, penColor, fillColor)
 A macro that sends a dot (a quadratic box with a border).

#define LARGE_DOT(id, x, y, penColor, fillColor)
 A macro that sends a dot (a quadratic box with a border).

#define LINE(id, x1, y1, x2, y2, penWidth, penStyle, penColor)
 A macro that sends a line.

#define ARROW(id, x1, y1, x2, y2, penWidth, penStyle, penColor)
 A macro that sends an arrow.

#define POSE_2D_SAMPLE(id, p, color)
 A macro that sends an arrow for a pose.

#define OCTANGLE(id, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6, x7, y7, x8, y8, color, fill)
 A macro that sends an octangle.

#define QUADRANGLE(id, x1, y1, x2, y2, x3, y3, x4, y4, penWidth, penStyle, penColor)
 A macro that sends an quadrangle.

#define RECTANGLE(id, x1, y1, x2, y2, penWidth, penStyle, penColor)
 A macro that sends an rectangle.

#define COMPLEX_DRAWING(id, expression)
 Complex drawings should be encapsuled by this macro.

#define DEBUG_DRAWING_FINISHED(id)   INFO(send_##id##_drawing, idDebugDrawingFinished, bin, (char)Drawings::id << (char)Drawings::getTypeOfDrawing(Drawings::id) );
 Indicates that all elements of the specified drawing are drawn.


Detailed Description

Macros for drawing.

Author:
Matthias Jüngel

Definition in file DebugDrawings.h.


Define Documentation

#define CIRCLE id,
center_x,
center_y,
radius,
penWidth,
penStyle,
penColor   ) 
 

Value:

INFO(send_##id##_drawing, idDebugDrawing2, bin, \
  (char)Drawings::circle << \
  (char)Drawings::id << \
  (char)Drawings::getTypeOfDrawing(Drawings::id) << \
  (int)(center_x) << (int)(center_y) << (int)(radius) << (char)(penWidth) << \
  (char)(penStyle) << (char)(penColor) \
  );
A macro that sends a circle.

Parameters:
id A drawing id (Drawings::FieldDrawing or Drawings::ImageDrawing)
center_x The x coordinate of the center of the circle
center_y The y coordinate of the center of the circle
radius The radius of the circle
penWidth The width of the arc of the circle
penStyle The pen style of the arc of the circle (Drawings::PenStyle)
penColor The color of the arc of the circle (Drawings::Color)

Definition at line 308 of file DebugDrawings.h.

Referenced by RBallSpecialist2::addBallPercept(), GT2004HeadControl::calculateClosestLandmark(), CircleCalculation::createCircle(), GT2004SelfLocator::draw(), GT2004BallLocator::drawBallPosition(), RFieldSpecialist::drawCircle(), BarCodeReader::execute(), GT2004BasicBehaviorDirectedScanForLandmarks::execute(), GT2004BasicBehaviorGoaliePosition::execute(), Circle::getType(), intersectGeometricObjects(), and CircleCalculation::paintBallPoints().

#define DOT id,
x,
y,
penColor,
fillColor   ) 
 

Value:

INFO(send_##id##_drawing, idDebugDrawing2, bin, \
  (char)Drawings::dot << \
  (char)Drawings::id << \
  (char)Drawings::getTypeOfDrawing(Drawings::id) << \
  (int)(x) << (int)(y) << (char)(penColor) << (char)(fillColor) \
  );
A macro that sends a dot (a quadratic box with a border).

Parameters:
id A drawing id (Drawings::FieldDrawing or Drawings::ImageDrawing)
x The x coordinate of the center of the box
y The y coordinate of the center of the box
penColor The color of the border of the dot (Drawings::Color)
fillColor The color of the dot (Drawings::Color)

Definition at line 325 of file DebugDrawings.h.

Referenced by GT2004BallSpecialist::BallPointList::add(), GT2004BallSpecialist::addBallPercept(), GT2004EdgeSpecialist::addCandidate(), RasterImageProcessor::addFlag(), GT2004ObstaclesLocator::addObstaclePoint(), GT2004ObstaclesLocator::addPSDPercept(), REnemySpecialist::calculateFarestPoint(), REnemySpecialist::calculateFarestPointCOG(), REnemySpecialist::calculateFarestPointFastCOG(), REnemySpecialist::calculatePointOnFieldFromSegment(), MotionRecognition::drawPixelFlow(), RBallSpecialist2::filterBallPoints(), RBridgeSpecialist::findBridgeMark(), BoxSpecialist::fitLandmark(), GT2004EdgeSpecialist::getEdgesPercept(), RBridgeSpecialist::getPosition(), REnemySpecialist::invokeOnPostScan(), REnemySpecialist::invokeOnPreScan(), RDefaultStrategy::postScan(), GT2004ImageProcessor::scan(), GT2004BallSpecialist::scanForBallPoints(), GT2004BeaconDetector::scanForBeaconEdges(), GT2004BeaconDetector::scanForBeaconPart(), GoalRecognizer::scanHorizontalForGoals(), GT2004GoalRecognizer::scanHorizontalForGoals(), GoalRecognizer::scanLinesForGoals(), GT2004GoalRecognizer::scanLinesForGoals(), GT2004FlagSpecialist::searchFlags(), BoxSpecialist::searchGoal(), BoxSpecialist::searchLandmark(), and RBallSpecialist2::validateCircle().

#define LARGE_DOT id,
x,
y,
penColor,
fillColor   ) 
 

Value:

INFO(send_##id##_drawing, idDebugDrawing2, bin, \
  (char)Drawings::largeDot << \
  (char)Drawings::id << \
  (char)Drawings::getTypeOfDrawing(Drawings::id) << \
  (int)(x) << (int)(y) << (char)(penColor) << (char)(fillColor) \
  );
A macro that sends a dot (a quadratic box with a border).

Parameters:
id A drawing id (Drawings::FieldDrawing or Drawings::ImageDrawing)
x The x coordinate of the center of the box
y The y coordinate of the center of the box
penColor The color of the border of the dot (Drawings::Color)
fillColor The color of the dot (Drawings::Color)

Definition at line 342 of file DebugDrawings.h.

Referenced by AStarSearch< PotentialfieldAStarNode, PotentialfieldAStarParameterSet, double >::draw().

#define LINE id,
x1,
y1,
x2,
y2,
penWidth,
penStyle,
penColor   ) 
 

Value:

INFO(send_##id##_drawing, idDebugDrawing2, bin, \
  (char)Drawings::line << \
  (char)Drawings::id << \
  (char)Drawings::getTypeOfDrawing(Drawings::id) << \
  (int)(x1) << (int)(y1) << (int)(x2) << (int)(y2) << (char)(penWidth) << (char)(penStyle) << (char)(penColor) \
  );
A macro that sends a line.

Parameters:
id A drawing id (Drawings::FieldDrawing or Drawings::ImageDrawing)
x1 The x coordinate of the starting point.
y1 The y coordinate of the starting point.
x2 The x coordinate of the end point.
y2 The y coordinate of the end point.
penWidth The width of the line
penStyle The pen style of the line (Drawings::PenStyle)
penColor The color of the line (Drawings::Color)

Definition at line 361 of file DebugDrawings.h.

Referenced by RFieldSpecialist::analyzeLines(), GT2004HeadControl::calculateClosestLandmark(), RBallSpecialist2::calculateLargeCircle(), RFieldSpecialist::checkRamp(), GT2004BeaconDetector::clusterPinkBeaconParts(), RBallSpecialist2::createBox(), BoxSpecialist::detectFreePartOfGoal(), GoalRecognizer::ColoredPartsCheck::determineLargePart(), GT2004GoalRecognizer::ColoredPartsCheck::determineLargePart(), AStarSearch< PotentialfieldAStarNode, PotentialfieldAStarParameterSet, double >::draw(), Field::draw(), ObservationTable< 280, 200, 25 >::draw(), GT2004SelfLocator::draw(), AngleSymbols::drawAngleShownByLeds(), GT2004BallLocator::drawBallPosition(), RFieldSpecialist::drawCross(), RFieldSpecialist::drawLine(), MotionRecognition::drawPixelFlow(), GT2004ImageProcessor::execute(), GT2004BeaconDetector::execute(), GT2004BasicBehaviorGoaliePosition::execute(), RFieldSpecialist::executePostProcessing(), RBridgeSpecialist::executePostProcessing(), BoxSpecialist::executePostProcessing(), GT2004BallSpecialist::findEndOfBall(), BoxSpecialist::fusionGoal(), ObstaclesModel::getDistanceInCorridor(), GT2004EdgeSpecialist::getEdgesPercept(), Line::getType(), RasterImageProcessor::init(), intersectGeometricObjects(), REnemySpecialist::invokeOnPostScan(), RFieldSpecialist::invokeOnPreScan(), REnemySpecialist::invokeOnPreScan(), RBridgeSpecialist::invokeOnPreScan(), RBallSpecialist2::invokeOnPreScan(), BoxSpecialist::invokeOnPreScan(), GT2004ImageProcessor::plot(), GT2004ImageProcessor::scan(), GT2004BeaconDetector::scanForPink(), GoalRecognizer::scanHorizontalForGoals(), GT2004GoalRecognizer::scanHorizontalForGoals(), GoalRecognizer::scanLinesForGoals(), GT2004GoalRecognizer::scanLinesForGoals(), GT2004ImageProcessor::scanRows(), BoxSpecialist::searchGoal(), and KalmanConstantSpeedModel::update().

#define ARROW id,
x1,
y1,
x2,
y2,
penWidth,
penStyle,
penColor   ) 
 

Value:

INFO(send_##id##_drawing, idDebugDrawing2, bin, \
  (char)Drawings::arrow << \
  (char)Drawings::id << \
  (char)Drawings::getTypeOfDrawing(Drawings::id) << \
  (int)(x1) << (int)(y1) << (int)(x2) << (int)(y2) << (char)(penWidth) << (char)(penStyle) << (char)(penColor) \
  );
A macro that sends an arrow.

Parameters:
id A drawing id (Drawings::FieldDrawing or Drawings::ImageDrawing)
x1 The x coordinate of the starting point.
y1 The y coordinate of the starting point.
x2 The x coordinate of the end point.
y2 The y coordinate of the end point.
penWidth The width of the line
penStyle The pen style of the line (Drawings::PenStyle)
penColor The color of the line (Drawings::Color)

Definition at line 381 of file DebugDrawings.h.

Referenced by GT2004ImageProcessor::calcEdgeAngle(), SimpleMotionRecognition::execute(), GT2004ImageProcessor::execute(), GT2004BasicBehaviorGoaliePosition::execute(), and GT2004EdgeSpecialist::getEdgesPercept().

#define POSE_2D_SAMPLE id,
p,
color   ) 
 

Value:

Pose2D current = p; current += Pose2D(-100,0); \
  LINE(id, int(current.translation.x),int(current.translation.y), int(p.translation.x), int(p.translation.y), \
  1, Drawings::ps_solid, color); \
  current = p; current += Pose2D(-40,-40); \
  LINE(id, int(current.translation.x), int(current.translation.y), int(p.translation.x), int(p.translation.y), \
  1, Drawings::ps_solid, color); \
  current = p; current += Pose2D(-40,40); \
  LINE(id, int(current.translation.x),int(current.translation.y),int(p.translation.x), int(p.translation.y), \
  1, Drawings::ps_solid, color); \
A macro that sends an arrow for a pose.

Parameters:
id A drawing id (Drawings::FieldDrawing or Drawings::ImageDrawing)
p A Pose2D describing the arrow
color The color of the line arrow (Drawings::Color)

Definition at line 396 of file DebugDrawings.h.

#define OCTANGLE id,
x1,
y1,
x2,
y2,
x3,
y3,
x4,
y4,
x5,
y5,
x6,
y6,
x7,
y7,
x8,
y8,
color,
fill   ) 
 

Value:

INFO(send_##id##_drawing, idDebugDrawing2, bin, \
  (char)Drawings::octangle << \
  (char)Drawings::id << \
  (char)Drawings::getTypeOfDrawing(Drawings::id) << \
  (int)(x1) << (int)(y1) << (int)(x2) << (int)(y2) << (int)(x3) << (int)(y3) << (int)(x4) << (int)(y4) << \
  (int)(x5) << (int)(y5) << (int)(x6) << (int)(y6) << (int)(x7) << (int)(y7) << (int)(x8) << (int)(y8) << \
  (char)ColorClasses::colorClassToDrawingsColor(color) << (char)fill \
  );
A macro that sends an octangle.

Parameters:
id A drawing id (Drawings::FieldDrawing or Drawings::ImageDrawing)
x1,y1,x2,y2,x3,y3,x4,y4,x5,y5,x6,y6,x7,y7,x8,y8 The coordinates of the 8 octagon vertices
color The color of the octangle
fill A boolean indicating if the octangle is filled

Definition at line 414 of file DebugDrawings.h.

#define QUADRANGLE id,
x1,
y1,
x2,
y2,
x3,
y3,
x4,
y4,
penWidth,
penStyle,
penColor   ) 
 

Value:

LINE(id, x1, y1, x2, y2, penWidth, penStyle, penColor); \
  LINE(id, x2, y2, x3, y3, penWidth, penStyle, penColor); \
  LINE(id, x3, y3, x4, y4, penWidth, penStyle, penColor); \
  LINE(id, x4, y4, x1, y1, penWidth, penStyle, penColor);
A macro that sends an quadrangle.

Parameters:
x1,y1,x2,y2,x3,y3,x4,y4 The coordinates of the 4 quadrangle vertices
id A drawing id (Drawings::FieldDrawing or Drawings::ImageDrawing)
penWidth The line width of the quadrangle
penStyle The line style, e.g. dotted
penColor The color of the quadrangle

Definition at line 432 of file DebugDrawings.h.

#define RECTANGLE id,
x1,
y1,
x2,
y2,
penWidth,
penStyle,
penColor   ) 
 

Value:

LINE(id, x1, y1, x1, y2, penWidth, penStyle, penColor); \
  LINE(id, x1, y2, x2, y2, penWidth, penStyle, penColor); \
  LINE(id, x2, y2, x2, y1, penWidth, penStyle, penColor); \
  LINE(id, x2, y1, x1, y1, penWidth, penStyle, penColor);
A macro that sends an rectangle.

Parameters:
x1,y1,x2,y2 The coordinates of 2 opposite corners
id A drawing id (Drawings::FieldDrawing or Drawings::ImageDrawing)
penWidth The line width of the rectangle
penStyle The line style, e.g. dotted
penColor The color of the quadrangle

Definition at line 446 of file DebugDrawings.h.

#define COMPLEX_DRAWING id,
expression   ) 
 

Value:

if (getDebugKeyTable().isActive(DebugKeyTable::send_##id##_drawing)) {\
  expression;\
  }
Complex drawings should be encapsuled by this macro.

Definition at line 455 of file DebugDrawings.h.

Referenced by GT2004SelfLocator::getTemplate(), CircleCalculation::paintBallPoints(), GT2004SelfLocator::resample(), GT2004GoalRecognizer::scanLinesForGoals(), AStarSearch< PotentialfieldAStarNode, PotentialfieldAStarParameterSet, double >::search(), and GT2004SelfLocator::updateByPoint().

#define DEBUG_DRAWING_FINISHED id   )     INFO(send_##id##_drawing, idDebugDrawingFinished, bin, (char)Drawings::id << (char)Drawings::getTypeOfDrawing(Drawings::id) );
 

Indicates that all elements of the specified drawing are drawn.

Parameters:
id A drawing id (Drawings::FieldDrawing or Drawings::ImageDrawing)

Definition at line 464 of file DebugDrawings.h.

Referenced by AngleSymbols::drawAngleShownByLeds(), GT2004BallLocator::drawBallPosition(), BarCodeReader::execute(), SimpleMotionRecognition::execute(), MotionRecognition::execute(), GT2004SelfLocator::execute(), GT2004ObstaclesLocator::execute(), RasterImageProcessor::execute(), GT2004ImageProcessor::execute(), GT2004BasicBehaviorDirectedScanForLandmarks::execute(), GT2004BasicBehaviorGoaliePosition::execute(), Motionfield::pathPlanningStillNeeded(), AStarSearch< PotentialfieldAStarNode, PotentialfieldAStarParameterSet, double >::search(), and GT2004BallSpecialist::searchBall().


Generated on Thu Sep 23 20:01:55 2004 for GT2004 by doxygen 1.3.6