26 {
27 if (!box->isRender) return;
28
29 auto cam = _view->GetInput();
30
31
32 Matrix2D camMat = cam->GetCamMatrix();
33 Matrix2D objMat = box->GameObj()->transform;
34 Matrix2D viewMat = _view->GameObj()->transform;
35
36
37
39
40
41
42
43 drawMat *=
44 viewMat.CreateScaleMatrix() * viewMat.CreateRotaMatrix() * viewMat.CreateMoveMatrix()
45 * camMat.CreateScaleMatrix() * camMat.CreateRotaMatrix() * camMat.CreateMoveMatrix()
46 * objMat;
47
48
49
52
53
54 leftTop *= leftTop.CreateInverseRotaMatrix();
55 rightBottom *= rightBottom.CreateInverseRotaMatrix();
56
57 DxLib::DrawBox(
58 leftTop.Position().x, leftTop.Position().y,
59 rightBottom.Position().x, rightBottom.Position().y,
60 GetColor(0, 255, 177),
61 false
62 );
63 }
Matrix2D CreateMoveMatrix()
Definition Matrix2D.hpp:197
@ IDENTITY_MATRIX
Definition Matrix2D.hpp:19