Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

/abstraction/edgewidth.h File Reference

#include "constants.h"

Include dependency graph for edgewidth.h:

Include dependency graph

Variables

float edgewidth [81]
 
Id
edgewidth.h,v 1.3 2006/09/18 06:22:14 nathanst Exp



Variable Documentation

float edgewidth[81]
 

Id
edgewidth.h,v 1.3 2006/09/18 06:22:14 nathanst Exp

This file is part of HOG.

HOG is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

HOG is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with HOG; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

HOG File

Lookup table for the edge widths.

The edges are as follows:

--------- | | | --------- | -|- | ---------

To cross the bottom middle edge.

Tile types: Empty: 0 Forward slash: 1 Backslash: 2

To translate into the lookup table index, multiply tile 1's type by 27, multiply tile 2's type by 9, multiply tile 3's type by 3, and add all the values together, along with tile 4.

So you end up with: 27*T1 + 9*T2 + 3*T3 + T4

For example,

--------- | \ | / | --------- | | \ | ---------

27*2 + 9*1 + 3*0 + 2 = 65

The edge width will be found in index 65.


Generated on Tue Aug 18 03:30:34 2009 for HOG by doxygen 1.3.4