00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #if !defined(__INCLUDE_TankLibh_INCLUDE__)
00022 #define __INCLUDE_TankLibh_INCLUDE__
00023
00024 #include <engine/ScorchedContext.h>
00025 #include <common/FixedVector.h>
00026 #include <list>
00027
00028 class Tank;
00029 class RandomGenerator;
00030 namespace TankLib
00031 {
00032 bool intersection(ScorchedContext &context,
00033 FixedVector position, fixed xy, fixed yz, fixed power,
00034 int dist);
00035 fixed getDistanceToTank(FixedVector &position, Tank *targetTank);
00036 void getTanksSortedByDistance(
00037 ScorchedContext &context,
00038 FixedVector &position,
00039 std::list<std::pair<fixed, Tank *> > &result,
00040 unsigned int teams,
00041 fixed maxDistance = -1);
00042 bool getSniperShotTowardsPosition(ScorchedContext &context,
00043 FixedVector &position, FixedVector &shootAt, fixed distForSniper,
00044 fixed &angleXYDegs, fixed &angleYZDegs, fixed &power,
00045 bool checkIntersection = false);
00046 void getShotTowardsPosition(
00047 ScorchedContext &context,
00048 RandomGenerator &random,
00049 FixedVector &position, FixedVector &shootAt,
00050 fixed &angleXYDegs, fixed &angleYZDegs, fixed &power);
00051 FixedVector &getVelocityVector(fixed xy, fixed yz);
00052 FixedVector &getGunPosition(fixed xy, fixed yz);
00053 };
00054
00055
00056 #endif