Trace Engine
A Raycaster Engine in C
Loading...
Searching...
No Matches
raycaster.h File Reference

Go to the source code of this file.

Macros

#define FOV   60
 

Enumerations

enum  { NORTH_SOUTH_WALL , WEAST_EAST_WALL }
 

Functions

int get_ammount_of_rays (void)
 
void cast_rays (void)
 
void init_raycaster (void)
 
void quit_raycaster (void)
 

Macro Definition Documentation

◆ FOV

#define FOV   60

Field of view (between 60 and 90 is okay, more than 90 warps the image)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
NORTH_SOUTH_WALL 
WEAST_EAST_WALL 

Function Documentation

◆ cast_rays()

void cast_rays ( void  )

Cast the 2D top-down vision rays for the player and calls the 3D render

◆ get_ammount_of_rays()

int get_ammount_of_rays ( void  )

Returns the current ammount of rays for current FOV and resolution

◆ init_raycaster()

void init_raycaster ( void  )

Initialize the raycaster

Note
Don't forget to use quit_raycaster after

◆ quit_raycaster()

void quit_raycaster ( void  )

Safely delete and disable the raycaster