-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cell.cpp
49 lines (36 loc) · 822 Bytes
/
Cell.cpp
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
45
46
47
48
49
#include "pch.h"
#include "Cell.h"
using namespace DirectX;
Cell::Cell() {
cellState = 0;
cellPosition = DirectX::SimpleMath::Vector3(0.f, 0.f, 0.f);
cellDimensions = DirectX::SimpleMath::Vector3(1.f, 1.f, 1.f);
}
Cell::~Cell() {
}
void Cell::SetPosition(DirectX::SimpleMath::Vector3 position)
{
cellPosition = position;
}
void Cell::SetCentre(DirectX::SimpleMath::Vector3 centre)
{
cellCentre = centre; // pivot at centre in DX
}
DirectX::SimpleMath::Vector3 Cell::GetPosition()
{
return cellPosition;
}
DirectX::SimpleMath::Vector3 Cell::GetDimensions() {
return cellDimensions;
}
DirectX::SimpleMath::Vector3 Cell::GetCentre() {
return cellCentre;
}
void Cell::SetState(int state)
{
cellState = state;
}
int Cell::GetState()
{
return cellState;
}