-
-
Notifications
You must be signed in to change notification settings - Fork 546
Expand file tree
/
Copy pathCClientColCuboid.h
More file actions
44 lines (36 loc) · 1.45 KB
/
CClientColCuboid.h
File metadata and controls
44 lines (36 loc) · 1.45 KB
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
40
41
42
43
44
/*****************************************************************************
*
* PROJECT: Multi Theft Auto v1.0
* (Shared logic for modifications)
* LICENSE: See LICENSE in the top level directory
* FILE: mods/shared_logic/CClientColCircle.h
* PURPOSE: Cuboid-shaped collision entity class
*
*****************************************************************************/
#pragma once
class CClientColCuboid final : public CClientColShape
{
DECLARE_CLASS(CClientColCuboid, CClientColShape)
public:
CClientColCuboid(CClientManager* pManager, ElementID ID, const CVector& vecPosition, const CVector& vecSize,
const CVector& vecRotation = CVector());
virtual CSphere GetWorldBoundingSphere();
virtual void DebugRender(const CVector& vecPosition, float fDrawRadius);
eColShapeType GetShapeType() { return COLSHAPE_CUBOID; }
bool DoHitDetection(const CVector& vecNowPosition, float fRadius);
const CVector& GetSize() { return m_vecSize; };
void SetSize(const CVector& vecSize)
{
m_vecSize = vecSize;
SizeChanged();
}
void GetRotationRadians(CVector& vecRotation) const override { vecRotation = m_vecRotation; }
void SetRotationRadians(const CVector& vecRotation) override
{
m_vecRotation = vecRotation;
SizeChanged();
}
protected:
CVector m_vecSize;
CVector m_vecRotation; // Radians, ZXY Euler order
};