Trace Engine
A Raycaster Engine in C
Loading...
Searching...
No Matches
ray_t Struct Reference

#include <render.h>

Data Fields

int index
 
trc_world_position_t pos
 
float angle
 
float distance
 
structures_t surface
 
float wall_orientation
 

Detailed Description

A ray is a line between the player and the closest wall in a certain angle

Field Documentation

◆ angle

float ray_t::angle

Angle between the X axis and the ray, from the player position

◆ distance

float ray_t::distance

Distance between the player and the wall that got hit by this ray

◆ index

int ray_t::index

Index of the ray, from 0 to AMMOUNT_OF_RAYS

◆ pos

Position of the hit between the ray and the wall

◆ surface

structures_t ray_t::surface

The surface of the wall that got hit

◆ wall_orientation

float ray_t::wall_orientation

The orientation of the wall (north-south or west-east)


The documentation for this struct was generated from the following file: