aboutsummaryrefslogtreecommitdiffstats
path: root/src/collision/ColBox.h
blob: 721756b47e78d9e245a4ba97cdbaf932e08215a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once

#include "SurfaceTable.h"

struct CBox
{
	CVector min;
	CVector max;
	CVector GetSize(void) { return max - min; }
	void Set(const CVector &min, const CVector &max) {  this->min = min; this->max = max; }
};

struct CColBox : public CBox
{
	uint8 surface;
	uint8 piece;

	void Set(const CVector &min, const CVector &max, uint8 surf, uint8 piece);
	using CBox::Set;

	CColBox& operator=(const CColBox &other);
};

// no name for this
// bounds for a number of triangles
struct CColTriBBox : public CBox
{
	int32 first;
	int32 last;
};