FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
hexgrid.cpp File Reference
#include <cassert>
#include "util/math/fife_math.h"
#include "util/log/logger.h"
#include "hexgrid.h"
+ Include dependency graph for hexgrid.cpp:

Go to the source code of this file.

Namespaces

 FIFE
 

Macros

#define ADD_PT(_x, _y)   vtx.push_back(ExactModelCoordinate(_x, _y));
 

Variables

static Logger FIFE::_log (LM_HEXGRID)
 
static const double FIFE::HEX_WIDTH = 1
 
static const double FIFE::HEX_TO_EDGE = HEX_WIDTH / 2
 
static const double FIFE::HEX_TO_CORNER = 0.5 / Mathd::Cos(Mathd::pi() / 6)
 
static const double FIFE::HEX_EDGE_HALF = HEX_TO_CORNER * Mathd::Sin(Mathd::pi() / 6)
 
static const double FIFE::VERTICAL_MULTIP = Mathd::Sqrt(HEX_WIDTH*HEX_WIDTH - HEX_TO_EDGE*HEX_TO_EDGE)
 
static const double FIFE::VERTICAL_MULTIP_INV = 1 / VERTICAL_MULTIP
 
static const double FIFE::HEX_EDGE_GRADIENT = 1 / Mathd::Sqrt(3)
 

Macro Definition Documentation

#define ADD_PT (   _x,
  _y 
)    vtx.push_back(ExactModelCoordinate(_x, _y));