?? worldmodel.h
字號:
int iLength, int iLeft ); ObjectT getMaxRangeUnknownPlayer ( ObjectT obj, char* strMsg ); VecPosition calculateVelocityDynamicObject( ObjectT o ); bool calculateStateBall2 ( VecPosition *posGlobal, VecPosition *velGlobal ); // methods to determine player state from perceived information bool calculateStatePlayer ( ObjectT o, VecPosition *posGlobal, VecPosition *velGlobal ); // methods to calculate noise range (quantized noise) bool getMinMaxDistQuantizeValue ( double dInput, double *dMin, double *dMax, double x1, double x2 ); bool getMinMaxDirChange ( double dOutput, double *dMin, double *dMax, double x1 ); bool getMinMaxDistChange ( double dOutput, double dDist, double *dMin, double *dMax, double x1, double xDist1, double xDist2 ); double invQuantizeMin ( double dOutput, double dQuantizeStep ); double invQuantizeMax ( double dOutput, double dQuantizeStep );public: // various update methods void mapUnknownPlayers ( Time time ); bool updateSSToHeteroPlayerType ( int i ); bool resetTimeObjects ( ); void removeGhosts ( ); ////////////////////////// PREDICTIONS (WorldModelPredict.C) ///////////////// // predictions of worldmodel about future states of different objects bool predictStateAfterCommand ( SoccerCommand com, VecPosition *pos, VecPosition *vel, AngDeg *angGlobalBody, AngDeg *angGlobalNeck, Stamina *sta = NULL ); bool predictAgentStateAfterCommand(SoccerCommand com, VecPosition *pos, VecPosition *vel, AngDeg *angBody, AngDeg *angNeck, Stamina *sta ); VecPosition predictAgentPosAfterCommand( SoccerCommand com ); void predictStateAfterDash ( double dActualPower, VecPosition *pos, VecPosition *vel, Stamina *sta, double dDirection ); void predictStateAfterTurn ( AngDeg dSendAngle, VecPosition *pos, VecPosition *vel, AngDeg *angBody, AngDeg *angNeck, Stamina *sta = NULL ); VecPosition predictPosAfterNrCycles ( ObjectT o, int iCycles, int iDashPower = 100, VecPosition *vel = NULL ); VecPosition predictAgentPos ( int iCycles, int iDashPower = 0 ); int predictNrCyclesToPoint ( ObjectT o, VecPosition posTo, AngDeg ang ); int predictNrCyclesToObject ( ObjectT objFrom, ObjectT objTo ); void predictStaminaAfterDash ( double dPower, Stamina *sta ); bool isCollisionAfterDash ( SoccerCommand soc ); ////////////////////////// HIGH-LEVEL METHODS (WorldModelHighLevel.C) //////// // methods that return the number of players in a certain area of the field int getNrInSetInRectangle ( ObjectSetT objectSet, Rectangle *rect = NULL ); int getNrInSetInCircle ( ObjectSetT objectSet, Circle c ); int getNrInSetInCone ( ObjectSetT objectSet, double dWidth, VecPosition start, VecPosition end ); // method that return the closest or fastest player to a certain pos or object ObjectT getClosestInSetTo ( ObjectSetT objectSet, ObjectT o , double *dDist = NULL, double dConfThr = -1.0 ); ObjectT getClosestInSetTo ( ObjectSetT objectSet, VecPosition pos, double *dDist = NULL, double dConfThr = -1.0 ); ObjectT getClosestInSetTo ( ObjectSetT objectSet, Line l, VecPosition pos1, VecPosition pos2, double *dDistToLine = NULL, double *dDistPos1ToP= NULL); ObjectT getClosestRelativeInSet ( ObjectSetT set, double *dDist = NULL ); ObjectT getSecondClosestInSetTo ( ObjectSetT objectSet, ObjectT o, double *dDist = NULL, double dConfThr = -1.0 ); ObjectT getSecondClosestRelativeInSet( ObjectSetT set, double *dDist = NULL ); ObjectT getFastestInSetTo ( ObjectSetT objectSet, ObjectT o, int *iCycles = NULL ); ObjectT getFastestInSetTo ( ObjectSetT objectSet, VecPosition pos, VecPosition vel, double dDecay, int *iCycles = NULL ); ObjectT getFurthestInSetTo ( ObjectSetT objectSet, ObjectT o , double *dDist = NULL, double dConfThr = -1.0 ); ObjectT getFurthestRelativeInSet ( ObjectSetT set, double *dDist = NULL ); double getMaxTraveledDistance ( ObjectT o ); // various methods dealing with sets of objects ObjectT getFirstEmptySpotInSet ( ObjectSetT objectSet, int iUnknownPlayer=-1 ); // boolean methods that indicate whether an object fulfills a constraint bool isVisible ( ObjectT o ); bool isBallKickable ( ); bool isBallCatchable ( ); bool isBallHeadingToGoal ( ); bool isBallInOurPossesion ( ); bool isBallInOwnPenaltyArea ( ); bool isInOwnPenaltyArea ( VecPosition pos ); bool isInTheirPenaltyArea ( VecPosition pos ); bool isConfidenceGood ( ObjectT ); bool isConfidenceVeryGood ( ObjectT ); bool isOnside ( ObjectT ); bool isOpponentAtAngle ( AngDeg ang, double dDist ); // various methods that supply specific information about the field Time getTimeFromConfidence ( double dConf ); double getOffsideX ( bool bIncludeComm= true); VecPosition getOuterPositionInField ( VecPosition pos, AngDeg ang, double dDist = 3.0, bool bWithPenalty = true); AngDeg getDirectionOfWidestAngle ( VecPosition posOrg, AngDeg angMin, AngDeg angMax, AngDeg *ang, double dDist ); // strategic positioning VecPosition getStrategicPosition ( int iPlayer = -1 ); // methods for computing the actual argument for a soccer command. double getActualKickPowerRate ( ); double getKickPowerForSpeed ( double dDesiredSpeed ); double getKickSpeedToTravel ( double dDistance, double dEndSpeed ); double getFirstSpeedFromEndSpeed ( double dEndSpeed, double dCycles ); double getFirstSpeedFromDist ( double dDist, double dCycles ); double getEndSpeedFromFirstSpeed ( double dFirstSpeed, double dCycles ); AngDeg getAngleForTurn ( AngDeg angDesiredAngle, double dSpeed ); AngDeg getActualTurnAngle ( AngDeg angActualAngle, double dSpeed ); double getPowerForDash ( VecPosition posRelTo, AngDeg angBody, VecPosition vel, double dEffort ); ////////////////////////// VARIOUS (WorldModel.C) //////////////////////////// // constructor WorldModel ( ServerSettings *ss, PlayerSettings *ps, Formations *fs ); // print information about WorldModel void show ( ostream &os = cout ); void show ( ObjectSetT set, ostream &os = cout ); void showQueuedCommands ( ostream &os = cout ); void show ( ObjectT o, ostream &os = cout ); // methods that deal with timing information bool waitForNewInformation ( ); // methods that deal with debugging void logObjectInformation ( int iLogLevel, ObjectT o );};#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -