BWAPI
SnippyHolloW-BroodwarBotQ-f01ab56/src/Micro/Formations/Formation.h
Go to the documentation of this file.
00001 #pragma once
00002 #include <BWAPI.h>
00003 #include <BWTA.h>
00004 #include <math.h>
00005 #include <windows.h>
00006 #include <Utils/Vec.h>
00007 #include <Micro/Units/BayesianUnit.h>
00008 
00009 #ifndef _SMART_POINTER_FORMATION_INCLUDED
00010 #define _SMART_POINTER_FORMATION_INCLUDED 1
00011 #include <boost/shared_ptr.hpp>
00012 class Formation;
00013 typedef boost::shared_ptr<Formation> pFormation;
00014 #endif
00015 
00016 class Formation 
00017 {
00018 public:
00019         Vec center;
00020         Vec direction;
00021     Vec mean;
00022         std::vector<BWAPI::Position> end_positions;
00023         int space; // space between units. 0 means units are only sperated by their sizes.
00024 
00025         Formation(const Formation& f);
00026         Formation(const Vec& center, const Vec& direction = Vec(0,0));
00027         Formation(const BWAPI::Position& p, const Vec& direction = Vec(0,0));
00028         ~Formation();
00029 
00030     void computeMean();
00031     // TODO should be called on onUnitDestroy for us
00032         virtual void computeToPositions(const std::vector<pBayesianUnit>& vUnit);
00033 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines