23 {
24 auto cam = _view->GetInput();
25
26
28
29 auto layers = layerFacade.
Layers();
30
31
32 for (
auto& layerName : layerFacade.
LayerName())
33 {
34 if (cam->FindExcludedLayer(layers[layerName]))
35 {
36
37 continue;
38 }
39
40 for (auto& imgMap : layers[layerName]->Queue())
41 {
42 auto img = imgMap.second;
43
44
45
46 Matrix2D camMat = cam->GetCamMatrix();
47 Matrix2D objMat = img->GameObj()->transform;
48 Matrix2D viewMat = _view->GameObj()->transform;
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
80
81
82
83
84 drawMat *=
85 viewMat.CreateScaleMatrix() * viewMat.CreateRotaMatrix() * viewMat.CreateMoveMatrix()
86 * camMat.CreateScaleMatrix() * camMat.CreateRotaMatrix() * camMat.CreateMoveMatrix()
87 * objMat;
88
89
90 img->Draw(drawMat);
91 }
92
93 }
94
95
96 }
vector< string > LayerName()
レイヤー名を取得する
Definition ImgComponent.cpp:91
map< string, Layer * > Layers()
Definition ImgComponent.hpp:321
LayerFacade & GetLayerFacade()
Definition ImgComponent.cpp:30
@ IDENTITY_MATRIX
Definition Matrix2D.hpp:19