void SceneLoader::createWalkArray()
{	
	Ogre::Real zPos = 0; //mWallCubeScale*0.5f;
	Ogre::Vector2 curPos, lastPos, nextPos;
	lastPos = curPos = mStartPos;

	mWalkVector.push_back(matrixCoordToSceneCoord(curPos, zPos));
	while(findNextPos(curPos, lastPos, nextPos))
	{
		lastPos = curPos;
		curPos = nextPos;
		mWalkVector.push_back(matrixCoordToSceneCoord(curPos, zPos));
	}
}
示例#2
0
文件: Test-2.cpp 项目: ijunglee/ooxx
void findNextPos(char* G)
{
    for(int i = 0; i < 25; i++)
    {
        G[i] = 'x';
        if(fourx(G) > 1)
        {
            printf("%d\n", G[i]);
        }
        else
        {
            for(int j = 0; j < 25; j++)
            {
                   if(G[j] == '.')
                   {
                            G[j] = 'o';
                            findNextPos(G);
                            G[j] = '.';
                    }
            }
        }
        G[i] = '.';
    }
}