//------------------------------------------------------------
//	adjdir.h
//	adjacent direction mapping 
//	1996/9/12
//	(C) Copyright Hitoshi Yamauchi
//------------------------------------------------------------
#ifndef _adjdir_h
#define _adjdir_h 1

#include "IntVec3.h"

class adjacentDirIV3Class {
private:
    adjacentDirIV3Class(const adjacentDirIV3Class& rhs);
    const adjacentDirIV3Class& operator=(const adjacentDirIV3Class& rhs);
protected:
    IntVec3 dir[7];
public:
    adjacentDirIV3Class(void)
    {
	this->dir[DIR_XPLUS].set(  1,  0,  0);
	this->dir[DIR_XMINUS].set(-1,  0,  0);
	this->dir[DIR_YPLUS].set(  0,  1,  0);
	this->dir[DIR_YMINUS].set( 0, -1,  0);
	this->dir[DIR_ZPLUS].set(  0,  0,  1);
	this->dir[DIR_ZMINUS].set( 0,  0, -1);
	this->dir[DIR_HERE].set(   0,  0,  0);
    }
    const IntVec3 get(int direction)
    {
	assert((0 <= direction) && (direction < DIR_3D_NUM));
	return(this->dir[direction]);
    }
};

#ifdef THIS_IS_GLOBAL_DEFINE_FILE
class adjacentDirIV3Class AdjDir;
#else
extern class adjacentDirIV3Class AdjDir;
#endif


#endif				// #ifndef _adjdir_h
