Package com.jackmeng.stl
Class stl_RayCaster
java.lang.Object
com.jackmeng.stl.stl_RayCaster
public class stl_RayCaster
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description private double
fov
private double[][]
map
private double
playerAngle
private double[]
playerPos
private int
screenHeight
private int
screenWidth
-
Constructor Summary
Constructors Constructor Description stl_RayCaster(int screenWidth, int screenHeight, double[] playerPos, double playerAngle, double fov, double[][] map)
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
screenWidth
private int screenWidth -
screenHeight
private int screenHeight -
playerPos
private double[] playerPos -
playerAngle
private double playerAngle -
fov
private double fov -
map
private double[][] map
-
-
Constructor Details
-
stl_RayCaster
public stl_RayCaster(int screenWidth, int screenHeight, double[] playerPos, double playerAngle, double fov, double[][] map)
-
-
Method Details
-
castRays
public java.awt.image.BufferedImage castRays() -
raycast
public static void raycast(int[][] map, double posX, double posY, double dirX, double dirY, double planeX, double planeY, int[] pixels, int width, int height, java.awt.Color color)
-