bounding_box_t

bounding_box_t represents the bounds of a player or entity in-game.

Declaration:

class bounding_box_t
{

	float x; // x position
	float y; // y position
	float w; // width
	float h; // height
	bool on_screen{}; // whether the box is on screen or not

	// create the x, y, w, h members automatically fron screen coordinates
	// this is already called on any bounding_box_t from a player_t
	void calculate(const vec2_t&in base_screen, const vec2_t&in head_screen);

};

Constructors:

Last updated