๋ถ๋ฅ ์ ์ฒด๋ณด๊ธฐ48 STL set class set์ ์ํ๋ key๋ฅผ ์ ์ํ๊ฒ ์ฐพ๊ณ , ์ด key๊ฐ ์๋์ผ๋ก ์ ๋ ฌ๋๊ธฐ๋ฅผ ์ํ ๋ ์ฌ์ฉํ๋ค. map๊ณผ๋ ๋ฌ๋ฆฌ key-value pair๋ก ์ ์ฅ๋๋ ๊ฒ์ด ์๋๋ผ key๋ง ์ ์ฅ๋๋ค. 1. ์๋ ์ ๋ ฌ 2. key๊ฐ ์๋์ง ์๋์ง ์์์ผ ํ ๋ 3. ๋ง์ ์๋ฃ๋ฅผ ์ ์ฅํ๊ณ , ๊ฒ์ ์๋๊ฐ ๋นจ๋ผ์ผ ํ ๋ #include set set1; // ์ค๋ฆ์ฐจ์ ์ ๋ ฌ set set1; // ๋ด๋ฆผ์ฐจ์ ์ ๋ ฌ set ์ฃผ์ ๋ฉค๋ฒ begin: ์ฒซ ๋ฒ์งธ ์์์ ๋๋ค ์ ๊ทผ ๋ฐ๋ณต์๋ฅผ ๋ฐํ clear: ์ ์ฅํ๊ณ ์๋ ๋ชจ๋ ์์๋ฅผ ์ญ์ empty: ์ ์ฅํ๊ณ ์๋ ์์๊ฐ ์์ผ๋ฉด true ๋ฐํ end: ๋ง์ง๋ง ์์ ๋ค์์(๋ฏธ ์ฌ์ฉ ์์ญ) ๋ฐ๋ณต์๋ฅผ ๋ฐํ erase: ํน์ ์์น์ ์์๋ ์ง์ ๋ฒ์์ ์์๋ค์ ์ญ์ fine: key์ ์ฐ๊ด๋ .. 2015. 3. 25. STL map class map 1. ์๋ ์ ๋ ฌ 2. ๋ง์ ์๋ฃ๋ฅผ ์ ์ฅ, ๊ฒ์์ด ๋นจ๋ผ์ผ ํจ 3. ๋น๋ฒํ๊ฒ ์ฝ์ /์ญ์ ๋ฅผ ํ์ง ์์ #include map map1; // key๋ฅผ ๊ธฐ์ค์ผ๋ก ์ค๋ฆ์ฐจ์์ผ๋ก ์ ๋ ฌ map map1; // ๋ด๋ฆผ์ฐจ์ ์ ๋ ฌ map ์ฃผ์ ๋ฉค๋ฒ begin: ์ฒซ๋ฒ์งธ ์์์ ๋๋ค ์ ๊ทผ ๋ฐ๋ณต์๋ฅผ ๋ฐํ clear: ์ ์ฅํ๊ณ ์๋ ๋ชจ๋ ์์ ์ญ์ empty: ์ ์ฅํ๊ณ ์๋ ์์๊ฐ ์์ผ๋ฉด true ๋ฐํ end: ๋ง์ง๋ง ์์ ๋ค์์(๋ฏธ ์ฌ์ฉ ์์ญ) ๋ฐ๋ณต์๋ฅผ ๋ฐํ erase: ํน์ ์์น์ ์์๋ ์ง์ ๋ฒ์์ ์์๋ค์ ์ญ์ find: ํด๋น key์ ์ฐ๊ด๋ ์์์ ๋ฐ๋ณต์ ๋ฐํ insert: ์์ ์ถ๊ฐ lower_bound: ์ง์ ํ key ์์๋ฅผ ๊ฐ์ง๊ณ ์๋ค๋ฉด ํด๋น ์์น์ ๋ฐ๋ณต์ ๋ฐํ operator[]: ์ง์ ํ key ๊ฐ์ผ๋ก ์์ .. 2015. 3. 25. [tbd] Deformation Transfer for Triangle Meshes (2004) Deformation Transfer : 3 steps 1. Establish triangle correspondence. 2. Represent source deformation with per-triangle affine transformations. 3. Apply source transformations to target by solving optimization problem. 1. Triangle correspondence Target triangle mesh transform "like" the source mesh. Source์ target์ mesh๊ฐ ๋ค๋ฅด๊ธฐ ๋๋ฌธ์ ์ผ๋๋ค/๋ค๋์ผ์ ๋งค์น๊ฐ ๊ฐ๋ฅํ๋ค. ํน์ ํฌ์ธํธ๋ฅผ ์ฐ์ด source์์ target์ผ๋ก์ iterative transform.. 2015. 3. 23. [tbd] ๋ณํํ๋ ฌ Transformation Matrix https://open.gl/transformations Translation Scaling Rotation – rotation about y-axis is heading/yaw – rotation about x-axis is pitch/elevation – rotation about z-axis is roll/bank Combining transformations is demonstrated by the multiplication of matrices. ex) Mtranslate * Mscale Transformations in OpenGL Model Matrix Ojbect coordinates (position in model) -> World coordinates (position in world.. 2015. 3. 23. ์ด์ 1 ยทยทยท 5 6 7 8 9 10 11 12 ๋ค์