#include"octree.h"
#include"e_face.h"

void Octree::e_face_initialization()
{
	int i,j;
	for (i=0;i<12;i++)
		for (j=0;j<12;j++) {
			e_face[i][j].faceidx=-1;
			e_face[i][j].facebit=0;
		}

e_face[0][9].faceidx=0;
e_face[0][9].orientation[0]=0;
e_face[0][9].orientation[1]=1;
e_face[0][9].orientation[2]=3;
e_face[0][9].orientation[3]=2;
e_face[0][9].facebit=(1<<0);
e_face[0][4].faceidx=0;
e_face[0][4].orientation[0]=0;
e_face[0][4].orientation[1]=1;
e_face[0][4].orientation[2]=3;
e_face[0][4].orientation[3]=2;
e_face[0][4].facebit=(1<<0);
e_face[0][8].faceidx=0;
e_face[0][8].orientation[0]=0;
e_face[0][8].orientation[1]=1;
e_face[0][8].orientation[2]=3;
e_face[0][8].orientation[3]=2;
e_face[0][8].facebit=(1<<0);
e_face[0][1].faceidx=1;
e_face[0][1].orientation[0]=0;
e_face[0][1].orientation[1]=1;
e_face[0][1].orientation[2]=3;
e_face[0][1].orientation[3]=2;
e_face[0][1].facebit=(1<<1);
e_face[0][2].faceidx=1;
e_face[0][2].orientation[0]=0;
e_face[0][2].orientation[1]=1;
e_face[0][2].orientation[2]=3;
e_face[0][2].orientation[3]=2;
e_face[0][2].facebit=(1<<1);
e_face[0][3].faceidx=1;
e_face[0][3].orientation[0]=0;
e_face[0][3].orientation[1]=1;
e_face[0][3].orientation[2]=3;
e_face[0][3].orientation[3]=2;
e_face[0][3].facebit=(1<<1);
e_face[1][0].faceidx=1;
e_face[1][0].orientation[0]=1;
e_face[1][0].orientation[1]=0;
e_face[1][0].orientation[2]=2;
e_face[1][0].orientation[3]=3;
e_face[1][0].facebit=(1<<1);
e_face[1][2].faceidx=1;
e_face[1][2].orientation[0]=1;
e_face[1][2].orientation[1]=0;
e_face[1][2].orientation[2]=2;
e_face[1][2].orientation[3]=3;
e_face[1][2].facebit=(1<<1);
e_face[1][3].faceidx=1;
e_face[1][3].orientation[0]=1;
e_face[1][3].orientation[1]=0;
e_face[1][3].orientation[2]=2;
e_face[1][3].orientation[3]=3;
e_face[1][3].facebit=(1<<1);
e_face[1][9].faceidx=2;
e_face[1][9].orientation[0]=0;
e_face[1][9].orientation[1]=1;
e_face[1][9].orientation[2]=3;
e_face[1][9].orientation[3]=2;
e_face[1][9].facebit=(1<<2);
e_face[1][5].faceidx=2;
e_face[1][5].orientation[0]=0;
e_face[1][5].orientation[1]=1;
e_face[1][5].orientation[2]=3;
e_face[1][5].orientation[3]=2;
e_face[1][5].facebit=(1<<2);
e_face[1][11].faceidx=2;
e_face[1][11].orientation[0]=0;
e_face[1][11].orientation[1]=1;
e_face[1][11].orientation[2]=3;
e_face[1][11].orientation[3]=2;
e_face[1][11].facebit=(1<<2);
e_face[2][0].faceidx=1;
e_face[2][0].orientation[0]=2;
e_face[2][0].orientation[1]=1;
e_face[2][0].orientation[2]=3;
e_face[2][0].orientation[3]=0;
e_face[2][0].facebit=(1<<1);
e_face[2][1].faceidx=1;
e_face[2][1].orientation[0]=2;
e_face[2][1].orientation[1]=1;
e_face[2][1].orientation[2]=3;
e_face[2][1].orientation[3]=0;
e_face[2][1].facebit=(1<<1);
e_face[2][3].faceidx=1;
e_face[2][3].orientation[0]=2;
e_face[2][3].orientation[1]=1;
e_face[2][3].orientation[2]=3;
e_face[2][3].orientation[3]=0;
e_face[2][3].facebit=(1<<1);
e_face[2][11].faceidx=5;
e_face[2][11].orientation[0]=0;
e_face[2][11].orientation[1]=1;
e_face[2][11].orientation[2]=3;
e_face[2][11].orientation[3]=2;
e_face[2][11].facebit=(1<<5);
e_face[2][6].faceidx=5;
e_face[2][6].orientation[0]=0;
e_face[2][6].orientation[1]=1;
e_face[2][6].orientation[2]=3;
e_face[2][6].orientation[3]=2;
e_face[2][6].facebit=(1<<5);
e_face[2][10].faceidx=5;
e_face[2][10].orientation[0]=0;
e_face[2][10].orientation[1]=1;
e_face[2][10].orientation[2]=3;
e_face[2][10].orientation[3]=2;
e_face[2][10].facebit=(1<<5);
e_face[3][0].faceidx=1;
e_face[3][0].orientation[0]=3;
e_face[3][0].orientation[1]=0;
e_face[3][0].orientation[2]=2;
e_face[3][0].orientation[3]=1;
e_face[3][0].facebit=(1<<1);
e_face[3][1].faceidx=1;
e_face[3][1].orientation[0]=3;
e_face[3][1].orientation[1]=0;
e_face[3][1].orientation[2]=2;
e_face[3][1].orientation[3]=1;
e_face[3][1].facebit=(1<<1);
e_face[3][2].faceidx=1;
e_face[3][2].orientation[0]=3;
e_face[3][2].orientation[1]=0;
e_face[3][2].orientation[2]=2;
e_face[3][2].orientation[3]=1;
e_face[3][2].facebit=(1<<1);
e_face[3][8].faceidx=4;
e_face[3][8].orientation[0]=0;
e_face[3][8].orientation[1]=1;
e_face[3][8].orientation[2]=3;
e_face[3][8].orientation[3]=2;
e_face[3][8].facebit=(1<<4);
e_face[3][7].faceidx=4;
e_face[3][7].orientation[0]=0;
e_face[3][7].orientation[1]=1;
e_face[3][7].orientation[2]=3;
e_face[3][7].orientation[3]=2;
e_face[3][7].facebit=(1<<4);
e_face[3][10].faceidx=4;
e_face[3][10].orientation[0]=0;
e_face[3][10].orientation[1]=1;
e_face[3][10].orientation[2]=3;
e_face[3][10].orientation[3]=2;
e_face[3][10].facebit=(1<<4);
e_face[4][0].faceidx=0;
e_face[4][0].orientation[0]=2;
e_face[4][0].orientation[1]=1;
e_face[4][0].orientation[2]=3;
e_face[4][0].orientation[3]=0;
e_face[4][0].facebit=(1<<0);
e_face[4][9].faceidx=0;
e_face[4][9].orientation[0]=2;
e_face[4][9].orientation[1]=1;
e_face[4][9].orientation[2]=3;
e_face[4][9].orientation[3]=0;
e_face[4][9].facebit=(1<<0);
e_face[4][8].faceidx=0;
e_face[4][8].orientation[0]=2;
e_face[4][8].orientation[1]=1;
e_face[4][8].orientation[2]=3;
e_face[4][8].orientation[3]=0;
e_face[4][8].facebit=(1<<0);
e_face[4][5].faceidx=3;
e_face[4][5].orientation[0]=0;
e_face[4][5].orientation[1]=1;
e_face[4][5].orientation[2]=3;
e_face[4][5].orientation[3]=2;
e_face[4][5].facebit=(1<<3);
e_face[4][6].faceidx=3;
e_face[4][6].orientation[0]=0;
e_face[4][6].orientation[1]=1;
e_face[4][6].orientation[2]=3;
e_face[4][6].orientation[3]=2;
e_face[4][6].facebit=(1<<3);
e_face[4][7].faceidx=3;
e_face[4][7].orientation[0]=0;
e_face[4][7].orientation[1]=1;
e_face[4][7].orientation[2]=3;
e_face[4][7].orientation[3]=2;
e_face[4][7].facebit=(1<<3);
e_face[5][1].faceidx=2;
e_face[5][1].orientation[0]=2;
e_face[5][1].orientation[1]=1;
e_face[5][1].orientation[2]=3;
e_face[5][1].orientation[3]=0;
e_face[5][1].facebit=(1<<2);
e_face[5][9].faceidx=2;
e_face[5][9].orientation[0]=2;
e_face[5][9].orientation[1]=1;
e_face[5][9].orientation[2]=3;
e_face[5][9].orientation[3]=0;
e_face[5][9].facebit=(1<<2);
e_face[5][11].faceidx=2;
e_face[5][11].orientation[0]=2;
e_face[5][11].orientation[1]=1;
e_face[5][11].orientation[2]=3;
e_face[5][11].orientation[3]=0;
e_face[5][11].facebit=(1<<2);
e_face[5][4].faceidx=3;
e_face[5][4].orientation[0]=1;
e_face[5][4].orientation[1]=0;
e_face[5][4].orientation[2]=2;
e_face[5][4].orientation[3]=3;
e_face[5][4].facebit=(1<<3);
e_face[5][6].faceidx=3;
e_face[5][6].orientation[0]=1;
e_face[5][6].orientation[1]=0;
e_face[5][6].orientation[2]=2;
e_face[5][6].orientation[3]=3;
e_face[5][6].facebit=(1<<3);
e_face[5][7].faceidx=3;
e_face[5][7].orientation[0]=1;
e_face[5][7].orientation[1]=0;
e_face[5][7].orientation[2]=2;
e_face[5][7].orientation[3]=3;
e_face[5][7].facebit=(1<<3);
e_face[6][4].faceidx=3;
e_face[6][4].orientation[0]=2;
e_face[6][4].orientation[1]=1;
e_face[6][4].orientation[2]=3;
e_face[6][4].orientation[3]=0;
e_face[6][4].facebit=(1<<3);
e_face[6][5].faceidx=3;
e_face[6][5].orientation[0]=2;
e_face[6][5].orientation[1]=1;
e_face[6][5].orientation[2]=3;
e_face[6][5].orientation[3]=0;
e_face[6][5].facebit=(1<<3);
e_face[6][7].faceidx=3;
e_face[6][7].orientation[0]=2;
e_face[6][7].orientation[1]=1;
e_face[6][7].orientation[2]=3;
e_face[6][7].orientation[3]=0;
e_face[6][7].facebit=(1<<3);
e_face[6][2].faceidx=5;
e_face[6][2].orientation[0]=2;
e_face[6][2].orientation[1]=1;
e_face[6][2].orientation[2]=3;
e_face[6][2].orientation[3]=0;
e_face[6][2].facebit=(1<<5);
e_face[6][11].faceidx=5;
e_face[6][11].orientation[0]=2;
e_face[6][11].orientation[1]=1;
e_face[6][11].orientation[2]=3;
e_face[6][11].orientation[3]=0;
e_face[6][11].facebit=(1<<5);
e_face[6][10].faceidx=5;
e_face[6][10].orientation[0]=2;
e_face[6][10].orientation[1]=1;
e_face[6][10].orientation[2]=3;
e_face[6][10].orientation[3]=0;
e_face[6][10].facebit=(1<<5);
e_face[7][4].faceidx=3;
e_face[7][4].orientation[0]=3;
e_face[7][4].orientation[1]=0;
e_face[7][4].orientation[2]=2;
e_face[7][4].orientation[3]=1;
e_face[7][4].facebit=(1<<3);
e_face[7][5].faceidx=3;
e_face[7][5].orientation[0]=3;
e_face[7][5].orientation[1]=0;
e_face[7][5].orientation[2]=2;
e_face[7][5].orientation[3]=1;
e_face[7][5].facebit=(1<<3);
e_face[7][6].faceidx=3;
e_face[7][6].orientation[0]=3;
e_face[7][6].orientation[1]=0;
e_face[7][6].orientation[2]=2;
e_face[7][6].orientation[3]=1;
e_face[7][6].facebit=(1<<3);
e_face[7][3].faceidx=4;
e_face[7][3].orientation[0]=2;
e_face[7][3].orientation[1]=1;
e_face[7][3].orientation[2]=3;
e_face[7][3].orientation[3]=0;
e_face[7][3].facebit=(1<<4);
e_face[7][8].faceidx=4;
e_face[7][8].orientation[0]=2;
e_face[7][8].orientation[1]=1;
e_face[7][8].orientation[2]=3;
e_face[7][8].orientation[3]=0;
e_face[7][8].facebit=(1<<4);
e_face[7][10].faceidx=4;
e_face[7][10].orientation[0]=2;
e_face[7][10].orientation[1]=1;
e_face[7][10].orientation[2]=3;
e_face[7][10].orientation[3]=0;
e_face[7][10].facebit=(1<<4);
e_face[8][0].faceidx=0;
e_face[8][0].orientation[0]=3;
e_face[8][0].orientation[1]=0;
e_face[8][0].orientation[2]=2;
e_face[8][0].orientation[3]=1;
e_face[8][0].facebit=(1<<0);
e_face[8][9].faceidx=0;
e_face[8][9].orientation[0]=3;
e_face[8][9].orientation[1]=0;
e_face[8][9].orientation[2]=2;
e_face[8][9].orientation[3]=1;
e_face[8][9].facebit=(1<<0);
e_face[8][4].faceidx=0;
e_face[8][4].orientation[0]=3;
e_face[8][4].orientation[1]=0;
e_face[8][4].orientation[2]=2;
e_face[8][4].orientation[3]=1;
e_face[8][4].facebit=(1<<0);
e_face[8][3].faceidx=4;
e_face[8][3].orientation[0]=1;
e_face[8][3].orientation[1]=0;
e_face[8][3].orientation[2]=2;
e_face[8][3].orientation[3]=3;
e_face[8][3].facebit=(1<<4);
e_face[8][7].faceidx=4;
e_face[8][7].orientation[0]=1;
e_face[8][7].orientation[1]=0;
e_face[8][7].orientation[2]=2;
e_face[8][7].orientation[3]=3;
e_face[8][7].facebit=(1<<4);
e_face[8][10].faceidx=4;
e_face[8][10].orientation[0]=1;
e_face[8][10].orientation[1]=0;
e_face[8][10].orientation[2]=2;
e_face[8][10].orientation[3]=3;
e_face[8][10].facebit=(1<<4);
e_face[9][0].faceidx=0;
e_face[9][0].orientation[0]=1;
e_face[9][0].orientation[1]=0;
e_face[9][0].orientation[2]=2;
e_face[9][0].orientation[3]=3;
e_face[9][0].facebit=(1<<0);
e_face[9][4].faceidx=0;
e_face[9][4].orientation[0]=1;
e_face[9][4].orientation[1]=0;
e_face[9][4].orientation[2]=2;
e_face[9][4].orientation[3]=3;
e_face[9][4].facebit=(1<<0);
e_face[9][8].faceidx=0;
e_face[9][8].orientation[0]=1;
e_face[9][8].orientation[1]=0;
e_face[9][8].orientation[2]=2;
e_face[9][8].orientation[3]=3;
e_face[9][8].facebit=(1<<0);
e_face[9][1].faceidx=2;
e_face[9][1].orientation[0]=1;
e_face[9][1].orientation[1]=0;
e_face[9][1].orientation[2]=2;
e_face[9][1].orientation[3]=3;
e_face[9][1].facebit=(1<<2);
e_face[9][5].faceidx=2;
e_face[9][5].orientation[0]=1;
e_face[9][5].orientation[1]=0;
e_face[9][5].orientation[2]=2;
e_face[9][5].orientation[3]=3;
e_face[9][5].facebit=(1<<2);
e_face[9][11].faceidx=2;
e_face[9][11].orientation[0]=1;
e_face[9][11].orientation[1]=0;
e_face[9][11].orientation[2]=2;
e_face[9][11].orientation[3]=3;
e_face[9][11].facebit=(1<<2);
e_face[10][3].faceidx=4;
e_face[10][3].orientation[0]=3;
e_face[10][3].orientation[1]=0;
e_face[10][3].orientation[2]=2;
e_face[10][3].orientation[3]=1;
e_face[10][3].facebit=(1<<4);
e_face[10][8].faceidx=4;
e_face[10][8].orientation[0]=3;
e_face[10][8].orientation[1]=0;
e_face[10][8].orientation[2]=2;
e_face[10][8].orientation[3]=1;
e_face[10][8].facebit=(1<<4);
e_face[10][7].faceidx=4;
e_face[10][7].orientation[0]=3;
e_face[10][7].orientation[1]=0;
e_face[10][7].orientation[2]=2;
e_face[10][7].orientation[3]=1;
e_face[10][7].facebit=(1<<4);
e_face[10][2].faceidx=5;
e_face[10][2].orientation[0]=3;
e_face[10][2].orientation[1]=0;
e_face[10][2].orientation[2]=2;
e_face[10][2].orientation[3]=1;
e_face[10][2].facebit=(1<<5);
e_face[10][11].faceidx=5;
e_face[10][11].orientation[0]=3;
e_face[10][11].orientation[1]=0;
e_face[10][11].orientation[2]=2;
e_face[10][11].orientation[3]=1;
e_face[10][11].facebit=(1<<5);
e_face[10][6].faceidx=5;
e_face[10][6].orientation[0]=3;
e_face[10][6].orientation[1]=0;
e_face[10][6].orientation[2]=2;
e_face[10][6].orientation[3]=1;
e_face[10][6].facebit=(1<<5);
e_face[11][1].faceidx=2;
e_face[11][1].orientation[0]=3;
e_face[11][1].orientation[1]=0;
e_face[11][1].orientation[2]=2;
e_face[11][1].orientation[3]=1;
e_face[11][1].facebit=(1<<2);
e_face[11][9].faceidx=2;
e_face[11][9].orientation[0]=3;
e_face[11][9].orientation[1]=0;
e_face[11][9].orientation[2]=2;
e_face[11][9].orientation[3]=1;
e_face[11][9].facebit=(1<<2);
e_face[11][5].faceidx=2;
e_face[11][5].orientation[0]=3;
e_face[11][5].orientation[1]=0;
e_face[11][5].orientation[2]=2;
e_face[11][5].orientation[3]=1;
e_face[11][5].facebit=(1<<2);
e_face[11][2].faceidx=5;
e_face[11][2].orientation[0]=1;
e_face[11][2].orientation[1]=0;
e_face[11][2].orientation[2]=2;
e_face[11][2].orientation[3]=3;
e_face[11][2].facebit=(1<<5);
e_face[11][6].faceidx=5;
e_face[11][6].orientation[0]=1;
e_face[11][6].orientation[1]=0;
e_face[11][6].orientation[2]=2;
e_face[11][6].orientation[3]=3;
e_face[11][6].facebit=(1<<5);
e_face[11][10].faceidx=5;
e_face[11][10].orientation[0]=1;
e_face[11][10].orientation[1]=0;
e_face[11][10].orientation[2]=2;
e_face[11][10].orientation[3]=3;
e_face[11][10].facebit=(1<<5);
}
