//========================================== class Player{ color[] imgBuffer; float[][] distort; int pixelsWidth; int pixelsHeight; float viewWidth; float viewHeight; float[] pos; float[] vel; float[] dir; float[] up; float[] left; Room currentRoom; int x=0,y=1,z=2; //------------ Player(Room cRoom){ loadPixels(); imgBuffer = new color[width*height]; pixelsWidth = width; pixelsHeight = height; viewWidth = 2f; viewHeight = 1.2f; pos = vector(0,80,80); vel = vector(0,0,0); dir = vector(0,0,-1); up = vector(0,-1,0); left= vector(-1,0,0); currentRoom = cRoom; distort = new float[width][height]; for( int i=0 ; i>1; int halfH = pixelsHeight>>1; float factorW = -viewWidth/(float)pixelsWidth; float factorH = -viewHeight/(float)pixelsHeight; //mark walls as visible/invisible //float[] ray1 = vector( dir[x]-viewWidth*0.5*left[x]-viewHeight*0.5*up[x] ); //currentRoom.imprintFrustrumOnWalls(); for( int i=0 ; i