๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

ํ”„๋กœ๊ทธ๋ž˜๋ฐ43

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.
๋ฆฌ๋ˆ…์Šค ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๊ฒฝ๋กœ ์ถ”๊ฐ€ Linux library path setting 1. LD_LIBRARY_PATH ํ™˜๊ฒฝ ๋ณ€์ˆ˜(environment variable) ์ด์šฉํ•˜์—ฌ shared library ์ฐธ์กฐ $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/usr/work/mylib ์ด ์„ค์ •์€ ์˜๊ตฌ์ ์ด์ง€ ์•Š์•„ ํ„ฐ๋ฏธ๋„์„ ๋‹ซ์œผ๋ฉด ์‚ฌ๋ผ์ง„๋‹ค. 2. ~/.bashrc ์ง์ ‘ ์ˆ˜์ • bashrc๋Š” ๋ณ„์นญ(alias)๊ณผ bash๊ฐ€ ์ˆ˜ํ–‰๋  ๋•Œ ์‹คํ–‰๋˜๋Š” ํ•จ์ˆ˜๋ฅผ ์ œ์–ดํ•˜๋Š” ์ง€์—ญ์ ์ธ ์‹œ์Šคํ…œ ์„ค์ •๊ณผ ๊ด€๋ จ๋œ ํŒŒ์ผ๋กœ์จ, ๋ชจ๋“  ํ”„๋กœ๊ทธ๋žจ์ด ์‹คํ–‰๋˜๊ธฐ ์ „ ์ˆ˜ํ–‰๋œ๋‹ค. vi ~/.bashrc (ํŒŒ์ผ๋ช… ์•ž์˜ .์€ ์ˆจ๊น€ํŒŒ์ผ์„ ์˜๋ฏธ) export LD_LIBRARY_PATH=/home/user/work/mylib:${LD_LIBRARY_PATH} ์œ„์˜ ๋ช…๋ น์–ด๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ๊ณ  ์ €์žฅ(:w) ํ•ด์ฃผ๋ฉด ์˜๊ตฌ์ .. 2015. 3. 20.