00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00072 #include "machine_dependent_compiler_directives.h"
00073
00074
00075 RS_BEGIN_NAMESPACE
00076
00077 inline const BallObject& BallView::getBallObject(const Int hist) const {
00078 return worldModelInterface->getWorld(hist).getBall();
00079 }
00080
00081 inline TimeUnknown BallView::getLastObservationTime(const Int hist) const {
00082 return getBallObject(hist).getObservationTime();
00083 }
00084
00085 inline FloatUE BallView::getRelativeDistance(const Int hist) const {
00086 return getRelativeVector(hist).getLength();
00087 }
00088
00089 inline AngleDegUE BallView::getRelativeDirection(const Int hist) const {
00090 return getRelativeVector(hist).getAngle();
00091 }
00092
00093 inline VectorUE BallView::getRelativeVector(const Int hist) const {
00094 VectorUE absoluteVector(agentView->getPosition(hist), getPosition(hist));
00095 if (agentView->getBodyDirection(hist).isKnown()) {
00096 return absoluteVector.rotate(-agentView->getBodyDirection(hist));
00097 }
00098 else {
00099 return absoluteVector.makeUnknown();
00100 }
00101 }
00102
00103 inline PointUE BallView::getPosition(const Int hist) const {
00104 return getBallObject(hist).getPosition();
00105 }
00106
00107 inline VectorUE BallView::getSpeedVector(const Int hist) const {
00108 return getBallObject(hist).getSpeedVector();
00109 }
00110
00111 inline VectorUE BallView::getRelativeSpeedVector(const Int hist) const {
00112 return getSpeedVector(hist) - agentView->getSpeedVector(hist);
00113 }
00114
00115 inline void BallView::myUpdateAfterInit() {}
00116
00117 inline void BallView::myNewCycle() {}
00118
00119 inline void BallView::myUpdateAfterSee() {}
00120
00121 inline void BallView::myUpdateAfterHear() {}
00122
00123 inline void BallView::myUpdateAfterCommand() {}
00124
00125 inline void BallView::myUpdateAfterSense() {}
00126
00127 inline void BallView::myUpdateAfterCoachMessage() {}
00128
00129
00130 RS_END_NAMESPACE