This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Model View Controller์ ์ฝ์๋ก ์ํ๋ฆฌ์ผ์ด์ ์ ์ธ๊ฐ์ง์ ์ญํ ๋ก ๊ตฌ๋ถํ ๊ฐ๋ฐ ๋ฐฉ๋ฒ๋ก ์ด๋ค. | |
์ฌ์ฉ์๊ฐ Controller๋ฅผ ์กฐ์ํ๋ฉด Controller๋ Model์ ํตํด์ ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ ธ์ค๊ณ | |
๊ทธ ์ ๋ณด๋ฅผ ๋ฐํ์ผ๋ก ์๊ฐ์ ์ธ ํํ์ ๋ด๋นํ๋ View๋ฅผ ์ ์ดํด์ ์ฌ์ฉ์์๊ฒ ์ ๋ฌํ๊ฒ ๋๋ค. | |
User(Request)-> Controller(Manipulates) -> Model(Update) -> View(Sees) -> User(Response) | |
์คํ๋ง์ ์ฃผ์ ๊ฐ๋ ์ด๋ค. | |
# MVC์ ์ฅ์ | |
- ์ ์ฐํ๊ณ ํ์ฅํ๊ธฐ ์ฝ๋ค |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
โ ๊ธฐ๋ฒ | |
1. ์ค๋ธ์ ํธ ํ๋ง(Object Pooling) | |
์ค๋ธ์ ํธ ์์ฑ(Instantiate)๊ณผ ์ญ์ (Destroy)์ ๋ถํ์ฆ๊ฐ๋ก ๊ฐ๋น์ง ์ฝ๋ ํฐ(G.C) ํธ์ถ ๋ ์ด ๋ฐ์ | |
๊ฐ์ฒด์ ์ฌ์ฌ์ฉ์ฑ์ ์ํด ์ฌ์ฉ - ๋น๋ฒํ ์ฐธ์กฐ์ผ ๊ฒฝ์ฐ ์ ์ฉํ๋ค. | |
์ค๋ธ์ ํธ ์์ฑ -> ์ค๋ธ์ ํธ ํ์ ๋ฃ์ -> ๊บผ๋ -> ์ฌ์ฉ์ ์ด๊ธฐํ -> ์ฌ์ฉ -> ์ฌ์ฉ ์ข ๋ฃ -> ์ค๋ธ์ ํธ ํ์ ๋ฃ์. | |
๋ค์ ์ฌ์ฉ์ด ํ์ํ ๋ ์ค๋ธ์ ํธ๋ฅผ ์์ฑํ์ง ์๊ณ pool์์ ๊บผ๋ธ๋ค. | |
2. ์ปฌ๋ง(Culling) | |
Culling๊ธฐ๋ฒ์ ํ๋ฉด๋ด์์ ๋ ๋๋งํ์ง์์๋ ๋๋ ๋ถํ์ํ๋ถ๋ถ๋ค์ ๋ ๋๋ง์์ ๋ฐฐ์ ํ๊ณ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
์ ๋ ฌ์ ์์ ์ ๋ ฌ ( ๋ฒ๋ธ ์ ๋ ฌ, ์ฝ์ ์ ๋ ฌ, ๋ณ๋ ฌ ์ ๋ ฌ )๊ณผ ๋ถ์์ ์ ๋ ฌ ( ์ ํ ์ ๋ ฌ, ํต ์ ๋ ฌ )์ด ์๋ค. | |
๋จ์(๊ตฌํ ๊ฐ๋จ)ํ์ง๋ง ๋นํจ์จ์ ์ธ ๋ฐฉ๋ฒ | |
์ฝ์ ์ ๋ ฌ, ์ ํ ์ ๋ ฌ, ๋ฒ๋ธ ์ ๋ ฌ | |
๋ณต์กํ์ง๋ง ํจ์จ์ ์ธ ๋ฐฉ๋ฒ | |
ํต ์ ๋ ฌ, ํ ์ ๋ ฌ, ํฉ๋ณ ์ ๋ ฌ, ๊ธฐ์ ์ ๋ ฌ | |
์ฝ์ ์ ๋ ฌ (Insertion Sort) | |
์์์ ์นด๋๋ฅผ ์ ๋ ฌํ๋ ๋ฐฉ๋ฒ๊ณผ ์ ์ฌํ๋ค. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ํ๋ก๊ทธ๋จ์ ๊ตฌํ ๋ฐ ๊ด๋ฆฌ๋ฅผ ์ฉ์ดํ๊ฒ ํ๊ธฐ ์ํด | |
์ฐ๊ด์๋ ๋ฐ์ดํฐ๋ค์ ๋ฌถ์ ์ ์๋ ๋ฌธ๋ฒ์ ์ฅ์น๋ก ๋ฑ์ฅ. | |
C์ธ์ด์์์ struct๋ ์ฐ๊ด์๋ ๋ฐ์ดํฐ๋ฅผ ๋ฌถ์ ์ ์๊ธฐ๋ง ํ์ง๋ง ํจ์ ์ ์ธ ๋ฐ ์ ์, ์์ฑ์ ๋ฐ ์๋ฉธ์ ์ ์ธ ๋ฐ ์ ์, ์์ ๊ตฌ์กฐ๋ฅผ ํ ์ ์๋ค. | |
ํ์ง๋ง C++์์์ struct๋ class์ ๋์๋ฐฉ์์ด ์ผ์นํ๋ค๊ณ ๋ณด๋ฉด๋๋ค. | |
ํจ์ ์ ์ธ ๋ฐ ์ ์, ์์ฑ์ ๋ฐ ์๋ฉธ์ ์ ์ธ ๋ฐ ์ ์, ์์ ๊ตฌ์กฐ๋ฅผ ์ฌ์ฉํ ์ ์๋ค. | |
C++ struct์ class์ ์ฐจ์ด์ ์ ๋ฉค๋ฒ์ ์ ๊ทผ ์ง์์์ ์ฐจ์ด๊ฐ ์๋ค. | |
์ฆ, ๊ตฌ์กฐ์ฒด๋ ์ ๊ทผ์ ์ด ์ง์์๋ฅผ ์ ์ธํ์ง์์ผ๋ฉด public ์ผ๋ก ํด๋์ค๋ private๋ก ์ ์ธ๋๋ค๋ ๊ฒ. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
์ธํฐํ์ด์ค : method์ ์ํ๋ง ์ ์ธํ ์ ์์ | |
1. ๋ณ์ ์ ์ธ ๋ถ๊ฐ๋ฅ | |
2. ํจ์ ์ ์ ๋ถ๊ฐ๋ฅ | |
3. ํจ์ ์ํ ์ ์ธ ๊ฐ๋ฅ | |
์๋ฐ์์๋ ๋ค์ค ์์์ด ๊ฐ๋ฅ. | |
์ถ์ํด๋์ค : ์ถ์ method๋ฅผ ๊ฐ์ง ์ ์๋ ํด๋์ค, ๊ฐ์ฒด ๊ฐ์ง ์ ์์ (class ์์ฑ ๋ถ๊ฐ) | |
1. ๋ณ์ ์ ์ธ ๊ฐ๋ฅ | |
2. ํจ์ ์ ์ ๊ฐ๋ฅ | |
3. ํจ์ ์ํ๋ง ์ ์ธ ๊ฐ๋ฅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
๊ฐ์ฒด์งํฅ์ ์ค์ํ ๊ฐ๋ ์ผ๋ก์ ์์๊ณผ๋ ์ฐ๊ฒฐ๋๋ ๊ฐ๋ ์ด๋ค. | |
ํด๋์ค๋ฅผ ์์๋ฐ์ ๊ฒฝ์ฐ ์ค๋ฒ๋ผ์ด๋ฉ์ ํ ์ ์๋๋ฐ ๊ทธ๋ผ ๊ฐ์ ํจ์์ง๋ง ๋ค๋ฅธ ๋ฐฉ์์ผ๋ก ๊ฒฐ๊ณผ๋ฅผ ๋ผ ์ ์๋ค. | |
์ด๋ฐ ๊ตฌ์กฐ๋ฅผ ๋คํ์ฑ์ด๋ผ๊ณ ํ๋ค. | |
๊ฒฐ๊ตญ ์์ ํ ์ค๋ฒ๋ผ์ด๋ฉ์ ํํ = ๋คํ์ฑ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[์๊ฐ] | |
C/C++์ ์ฐธ์กฐํ ์ธ์ด, ๋ท๋ท ์ ์ฉ์ธ์ด | |
์ฝ๊ฐ ๋ชจ๋ ์ธ์ด์ ์งฌ๋ฝ์ด๋ผ๋ ์๋ฆฌ๋ฅผ ๋ฃ๊ธฐ๋ ํ๋ค. | |
[ํน์ง] | |
๊ฐ๋น์ง ์ปฌ๋ ์ ๊ธฐ๋ฅ์ด ์๋ค. | |
๋ค์ค์์์ ์ง์ํ์ง ์๋๋ค. | |
ํด๋์ค๊ฐ์ ํ๋ ๋ ์ง์ ์ ํ ์ ์๋ค. | |
๋ํดํธ ์ธ์๋ฅผ ์ง์ํ์ง ์๋๋ค. | |
์๋ฃํ์ ๋ํด ์๊ฒฉํ๋ค. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. ์ํ(Circle) ๊ทธ๋ฆผ์ ๊ธฐ๋ฒ | |
์ฑ๋ฅ ๋ฌธ์ ๋๋ฌธ์ ๋ชจ๋ฐ์ผ ์ฅ์น์์๋ ๊ทธ๋ฆผ์๋ฅผ ๋๊ทธ๋ผ๋ฏธ๋ก ๊ฐ๋จํ๊ฒ ํํํ๋ ๊ฒ์ด ์ผ๋ฐ์ ์ ๋๋ค. | |
์ํ์ ํ ์ค์ณ๋ฅผ ์ฌ์ฉํ๋ ํ๋ฉด์ ๋ง๋ค๊ณ ๊ทธ๊ฑธ ์ผ๋ฆญํฐ ๋ฐ์ ๋ฐฐ์นํ๋ ๊ฒ์ด์ง์. | |
ํํ๋ ๋๋ฌด๋๋ ๊ฐ๋จํ๊ธดํ์ง๋ง ์ด ๋ง์ ๋ ์๋๊ฒ๊ณผ ์๋๊ฒ์ ์ฐจ์ด๋ ํฝ๋๋ค. | |
๋จ์ - ํ๋ฉด์ด ์๋๊ณ ์๋ ํํ์ด ๋ถ๊ฐ๋ฅํ๋ค๋ ๋จ์ ์ ์๋ค. | |
2. ํฌ์(Projected Shadow) ๊ทธ๋ฆผ์ ๊ธฐ๋ฒ | |
Direct Light๊ธฐ๋ฅ์ฒ๋ผ ๊ด์์์ ํฌ์ํ๋ ๊ทธ๋ฆผ์์ ํ ์ค์ฒ๋ฅผ ์ค์๊ฐ์ผ๋ก ์์ฑํด | |
๊ทธ๋ฆผ์ ํ ์ค์ณ์ ์ ์ฅํ์ฌ ํ๋ฉด์ด ์๋์ฌ๋ ์ค์ ๊ทธ๋ฆผ์ ์ฒ๋ผ ๋ณด์ด๊ฒ ํจ. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cull ์ถ๋ ค์ ์ฃฝ์ด๋ค. ์ ๋ป Culling ์ธ๋์๋ ๋ ๋๋ง์ ๋ฐฐ์ ํจ | |
Culling๊ธฐ๋ฒ์ ํ๋ฉด๋ด์์ ๋ ๋๋งํ์ง์์๋ ๋๋ ๋ถํ์ํ๋ถ๋ถ๋ค์ ๋ ๋๋ง์์ ๋ฐฐ์ ํ๊ณ | |
ํ๋ฉด๋ด์์ ๋ณด์ฌ์ง๋ ๋ถ๋ถ๋ง ๋ ๋๋งํ์ฌ ์ต์ ํ๋ฅผ ํ๋๋ฐฉ์์ด๋ค. | |
๋ฐฑํ์ด์ค(ํ๋ฉด์ ๋ณ) ์ปฌ๋ง Backface Culling : ํด๋ฆฌ๊ณค์ ํ๋ฉด์ ์ ๊ฑฐํ๋ค. | |
ํ๋ก์คํ (์๊ฐ์ ๋์ฒด) ์ปฌ๋ง Frustum Culling : ์นด๋ฉ๋ผ ์์ญ๋ด ๋๋ก์ ์ ๋ณด๋ง ์ด๋ฆฌ๊ณ ๋๋จธ์ง๋ ๋ฒ๋ฆผ, ๊ฐ๋ ค์ง ๊ฒ๋ ์ด๋ฆผ. | |
๋ ์ด์ด๋ณ ์ฐจ๋จ ๊ฑฐ๋ฆฌ ์ค์ Per Layer Cull Distances |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
์ค์ผ๋ฌ(Euler)์ ์ฟผํฐ๋์จ(Quaternion)์ 3D ๋ณํ์์ ํ์ ์ ํํํ๋ ๋ฐฉ๋ฒ์ด๋ค. | |
์ค์ผ๋ฌ๋ 3๊ฐ์ ์ถ์ ๋ํ ๊ฐ๋๋ฅผ ํ์ ์ ๋ณด๋ก ์ฌ์ฉํ๋ค. X,Y,Z์ถ์ ๋ํด ํ์ ํ ๋งํผ์ ๋งํ๋ ๊ฒ์ด๋ค. | |
์ค์ผ๋ฌ์์๋ ๊ฐ ์ถ์ Right, Up, Forward๋ผ ๋ถ๋ฅด๊ณ ๊ฐ ์ถ์ ๋ํ ๊ฐ๋๋ฅผ Pitch, Roll, Yaw๋ผ ๋ถ๋ฅธ๋ค. | |
์ด ๋ฐฉ์์ ๋นํ๊ธฐ์ ์์ธ ํํ ์ ๋ณด๋ก ๋ง์ด ์ฌ์ฉ๋๋ค. | |
์ด ๋ฐฉ์์ ์ฅ์ ์ ๋งค์ฐ ์ง๊ด์ ์ด๋ผ๋ ๊ฒ์ด๋ค. | |
์ด ์ฅ์ ๋๋ฌธ์ ๋ง์ 3D๊ด๋ จ ํ๋ก๊ทธ๋จ์ ํ์ ์ ๋ณด๋ฅผ ์ ๋ ฅํ ๋ Euler๋ฐฉ์์ ์ฌ์ฉํ๋ค. | |
์ค์ผ๋ฌ ๋ฐฉ์์ผ๋ก ํ์ ์ ๋ณด๋ฅผ ํํํ๋ฉด ๊ฐ ์ถ์ ๋ํด 3๊ฐ์ ํ์ ํ๋ ฌ์ด ๋๋ค. |