1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.g2d.routing;
15 public class Constants {
16 static public final int EAST = 0;
17 static public final int SOUTH = 1;
18 static public final int WEST = 2;
19 static public final int NORTH = 3;
21 static public final int EAST_FLAG = 1 << EAST;
22 static public final int SOUTH_FLAG = 1 << SOUTH;
23 static public final int WEST_FLAG = 1 << WEST;
24 static public final int NORTH_FLAG = 1 << NORTH;
26 static public final int POSSIBLE_DIRECTIONS[][] = {
30 new int[] { EAST, SOUTH },
32 new int[] { EAST, WEST },
33 new int[] { SOUTH, WEST },
34 new int[] { EAST, SOUTH, WEST },
36 new int[] { EAST, NORTH },
37 new int[] { SOUTH, NORTH },
38 new int[] { EAST, SOUTH, NORTH },
39 new int[] { WEST, NORTH },
40 new int[] { EAST, WEST, NORTH },
41 new int[] { SOUTH, WEST, NORTH },
42 new int[] { EAST, SOUTH, WEST, NORTH }