Skip to content

A first implementation of 2D Ray Casting made to practice C++.

Notifications You must be signed in to change notification settings

tmioton/2DRayCasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

106 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2DRayCastingCpp

2D Ray Casting made to practice C++.

Other rendering modes are available using the 1, 2, 3, and 4 keys. Mode 1 is the final result of casting rays to endpoints and using a triangle fan to fill the light. Mode 2 is the rays cast to the endpoints before the triangle fan fill. Mode 4 shows rays cast at specified angles, and mode 3 is a triangle fan fill using these rays. Modes 3 and 4 represent a more naive attempt at light fill. The rendering of the boundaries can be toggled using the B key. The Space key toggles whether the casters follow the mouse.

Based on Daniel Shiffman's P5.js Ray Casting 2D

About

A first implementation of 2D Ray Casting made to practice C++.

Resources

Stars

Watchers

Forks