|
Trace Engine
A Raycaster Engine in C
|
#include <render.h>
Data Fields | |
| int | index |
| trc_world_position_t | pos |
| float | angle |
| float | distance |
| structures_t | surface |
| float | wall_orientation |
A ray is a line between the player and the closest wall in a certain angle
| float ray_t::angle |
Angle between the X axis and the ray, from the player position
| float ray_t::distance |
Distance between the player and the wall that got hit by this ray
| int ray_t::index |
Index of the ray, from 0 to AMMOUNT_OF_RAYS
| trc_world_position_t ray_t::pos |
Position of the hit between the ray and the wall
| structures_t ray_t::surface |
The surface of the wall that got hit
| float ray_t::wall_orientation |
The orientation of the wall (north-south or west-east)