/
CColCuboid.h
39 lines (30 loc) · 1.14 KB
/
CColCuboid.h
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
31
32
33
34
35
36
37
38
39
/*****************************************************************************
*
* PROJECT: Multi Theft Auto v1.0
* LICENSE: See LICENSE in the top level directory
* FILE: mods/deathmatch/logic/CColCuboid.h
* PURPOSE: Cube-shaped collision entity class
*
* Multi Theft Auto is available from http://www.multitheftauto.com/
*
*****************************************************************************/
#pragma once
#include "CColShape.h"
class CColCuboid : public CColShape
{
public:
CColCuboid(CColManager* pManager, CElement* pParent, const CVector& vecPosition, const CVector& vecSize);
CElement* Clone(bool* bAddEntity, CResource* pResource) override;
virtual CSphere GetWorldBoundingSphere();
eColShapeType GetShapeType() { return COLSHAPE_CUBOID; }
bool DoHitDetection(const CVector& vecNowPosition);
const CVector& GetSize() { return m_vecSize; };
void SetSize(const CVector& vecSize)
{
m_vecSize = vecSize;
SizeChanged();
};
protected:
bool ReadSpecialData(const int iLine) override;
CVector m_vecSize;
};