{"id":516,"date":"2011-11-20T22:16:38","date_gmt":"2011-11-20T13:16:38","guid":{"rendered":"http:\/\/daily.belltail.jp\/?p=516"},"modified":"2011-11-20T22:22:39","modified_gmt":"2011-11-20T13:22:39","slug":"c%e7%94%a8%e3%83%93%e3%82%b8%e3%83%a5%e3%82%a2%e3%83%a9%e3%82%a4%e3%82%bc%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e7%92%b0%e5%a2%83openframeworks%e3%82%92%e3%81%ba%e3%82%8d%e3%81%ba%e3%82%8d","status":"publish","type":"post","link":"https:\/\/daily.belltail.jp\/?p=516","title":{"rendered":"C++\u7528\u30d3\u30b8\u30e5\u30a2\u30e9\u30a4\u30bc\u30fc\u30b7\u30e7\u30f3\u74b0\u5883&#8221;openFrameworks&#8221;\u3092\u307a\u308d\u307a\u308d\u3057\u3066\u307f\u305f"},"content":{"rendered":"<p>\u30d3\u30b8\u30e5\u30a2\u30e9\u30a4\u30bc\u30fc\u30b7\u30e7\u30f3\u8a00\u8a9e\uff0c\u3059\u306a\u308f\u3061\u624b\u8efd\u306a\u30c7\u30b6\u30a4\u30cb\u30f3\u30b0\u3084\u53ef\u8996\u5316\u306b\u7279\u5316\u3057\u305f\u8a00\u8a9e\u30fb\u74b0\u5883\u3068\u3044\u3048\u3070\uff0cJava\u30d9\u30fc\u30b9\u306eprocessing\u304c\u975e\u5e38\u306b\u6709\u540d\u3067\u3059\uff0e<br \/>\nC++\u4e0a\u3067\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u3057\u3066\u63d0\u4f9b\u3055\u308c\u308b\u540c\u69d8\u306e\u3082\u306e\u306b\u306fcinder\u3084openFramework\u3068\u3044\u3063\u305f\u3082\u306e\u304c\u3042\u308a\u307e\u3059\uff0e<br \/>\n\u7279\u5fb4\u306f\u3084\u3063\u3071\u308a\u901f\u3044\u3053\u3068\uff0e<br \/>\n\u4f8b\u3048\u3070Processing\u3068\u6bd4\u3079\u308b\u3068C++\u306a\u306e\u3067\u7136\u308b\u3079\u304d\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u3059\u308c\u3070\u7136\u308b\u3079\u304d\u901f\u5ea6\u5dee\u3067\u52d5\u304d\u307e\u3059\u3057\uff0c\u4f55\u3082\u8003\u3048\u306a\u304f\u3068\u3082OpenGL\u3067\u3088\u308d\u3057\u304f\u63cf\u753b\u3057\u3066\u304f\u308c\u308b\u306e\u3067\uff0c\u305d\u3053\u3089\u306eX11\u3084GDI\u3067\u52d5\u304fGUI\u30c4\u30fc\u30eb\u30ad\u30c3\u30c8\u3067\u9811\u5f35\u308b\u306e\u3068\u306f\u6bb5\u9055\u3044\u306e\u901f\u5ea6\u3067\u52d5\u304d\u307e\u3059\uff0e<\/p>\n<p>\u4ecacinder\u306e\u4eba\u6c17\u304c\u9ad8\u307e\u3063\u3066\u3044\u308b\u5370\u8c61\u3067\u3059\u304c\uff0c<strong>Linux\u3067\u4f7f\u3048\u306a\u3044<\/strong>(\u7121\u7406\u3067\u306f\u306a\u3044\u3089\u3057\u3044\u3051\u3069\u30bf\u30c0\u3067\u306f\u3059\u307e\u306a\u3044)\u3068\u3044\u3046\u50d5\u306b\u3068\u3063\u3066\u306f\u3068\u3066\u3082\u6b8b\u5ff5\u306a\u304b\u3093\u3058\u306a\u306e\u3067\uff0c\u3088\u308a\u6b74\u53f2\u306e\u3042\u308b(\u3089\u3057\u3044)openFrameworks\u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u305f\uff0e<\/p>\n<p>\u3067\uff0c\u5b9f\u306f2011\u5e7412\u67083\u65e5\u306b\u958b\u50ac\u3055\u308c\u308b\u540d\u53e4\u5c4b\u5408\u540c\u61c7\u89aa\u4f1a\u3067\uff0c\u50d5\u304c\u3053\u306e\u30cd\u30bf\u3067LT\u3055\u305b\u3066\u3044\u305f\u3060\u304f\u3053\u3068\u306b\u306a\u3063\u3066\u307e\u3059\uff0e<br \/>\n\u3088\u308d\u3057\u304b\u3063\u305f\u3089\u76f4\u63a5\u304a\u3044\u3067\u3044\u305f\u3060\u304f\u304bust\u3067\u8996\u8074\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff0e<br \/>\n[http:\/\/partake.in\/events\/37c263eb-7a15-401e-b14c-bcb9c9d43493:title=NGK2011B \u663c\u306e\u90e8](LT\u5927\u4f1a) \u2190\u3053\u3063\u3061\u3067\u3057\u3083\u3079\u308a\u307e\u3059<br \/>\n[http:\/\/partake.in\/events\/81e20a94-40b6-4a61-8798-223961e628fa:title=NGK2011B \u591c\u306e\u90e8](\u61c7\u89aa\u4f1a+\u91ce\u826fLT\u5927\u4f1a)<\/p>\n<p><!--more--><\/p>\n<p>\u4ee5\u4e0b\u9762\u5012\u306a\u306e\u3067\uff0copenFrameworks\u3092ofx\u3068\u7565\u3057\u307e\u3059\uff0e<\/p>\n<p>*\u74b0\u5883\u69cb\u7bc9<\/p>\n<p>[http:\/\/www.openframeworks.cc\/download]\u304b\u3089\u9069\u5207\u306b\u843d\u3068\u3057\u3066\u304d\u3066\u304f\u3060\u3055\u3044\uff0e<br \/>\n\u4ee5\u4e0bUbuntu\u524d\u63d0\uff0e<br \/>\nUbuntu\u306f11.10\uff0cCode::Blocks\u306f10.05\uff0cofx\u306f0.07\uff0cgcc\u306f4.6.1\u3067\u3059\uff0e<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3064\u3044\u3066\u306freadme\u306b\u5168\u3066\u66f8\u3044\u3066\u3042\u308b\u3093\u3067\u3059\u304c\uff0c\u3061\u3087\u3063\u3068\uff8b\uff9e\uff90\uff6e\uff73\u306a\u306e\u3067\uff0c\u3088\u308a\u9069\u5207\u3068\u601d\u308f\u308c\u308b\u65b9\u6cd5\u3092\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\uff0e<\/p>\n<p>**\u5404\u7a2e\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<p>ofx\u3092\u5c55\u958b\u3057\u305f\u4e2d\u306escripts\/linux\/ubuntu\u306b\u3042\u308b<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ninstall_codeblocks.sh\r\ninstall_dependencies.sh\r\ninstall_codecs.sh\r\n<\/pre>\n<p>\u3092\u9806\u306broot\u3067\u5b9f\u884c\u3059\u308b\u3060\u3051\uff0e<br \/>\n\u898b\u3066\u306e\u901a\u308a\uff0cCode::Blocks\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\uff0e<\/p>\n<p>**Code::Blocks\u4e0a\u3067ofx\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/p>\n<p>\u3053\u3053\u304c\u5384\u4ecb\u3067\u3059\uff0e\u6ce8\u610f\u6df1\u304f\u3064\u3044\u3066\u304d\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n<p>-scripts\/linux\/codeblocks_wizard\u306b\u884c\u304f<br \/>\n-\u305d\u3053\u306b\u3042\u308bopenframeworks\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u81ea\u4f53\u3092\u307e\u308b\u3054\u3068\/usr\/share\/codeblocks\/templates\/wizard\/\u306bcp -r<br \/>\n-\/usr\/share\/codeblocks\/templates\/wizard\/config.script\u3092\u958b\u3044\u3066\u6b21\u306e\u6587\u3092\u9069\u5207\u306b\u8ffd\u8a18\u3059\u308b\uff0e<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nRegisterWizard(wizCustom,     _T(&quot;openframeworks&quot;),           _T(&quot;OpenFrameworks&quot;),          _T(&quot;2D\/3D Graphics&quot;));\r\n<\/pre>\n<p>\u307e\u305areadme\u306b\u300c\u81ea\u524d\u30d3\u30eb\u30c9\u3057\u305f\u3093\u3058\u3083\u306a\u3051\u308c\u3070$HOME\/.codeblocks\/&#8230;\u3092\u3044\u3058\u3063\u3066\u306d\uff3e\uff3e\u300d\u3068\u3042\u308a\u307e\u3059\u304c\u305d\u308c\u3057\u3061\u3083\u3044\u304b\u3093\u3067\u3059\uff0e<\/p>\n<p>\u6b21\u306b\uff0c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u6210\u30b9\u30af\u30ea\u30d7\u30c8(createProject.py)\u306e\u5b9f\u884c\u8a2d\u5b9a\uff0e<br \/>\nofx\u3067\u306fCode::Blocks\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u308b\u305f\u3081\u306bcreateProject.py\u3092\u624b\u52d5\u307e\u305f\u306fIDE\u5185\u90e8\u3067\u5b9f\u884c\u3057\u307e\u3059\u304c\uff0c\u3053\u306e\u5185\u90e8\u304b\u3089\u306e\u547c\u3073\u51fa\u3057\u8a2d\u5b9a\u304c\u5b9f\u306b\u307e\u305a\u3044\uff0e<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\uff0c<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n \/usr\/share\/codeblocks\/templates\/wizard\/openframeworks\/wizards.script\r\n<\/pre>\n<p>\u3092\u66f8\u304d\u63db\u3048\u307e\u3059(\u3055\u3063\u304d\u30b3\u30d4\u30fc\u3057\u3066\u304d\u305f\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u306d\uff0e\u30b3\u30d4\u30fc\u3059\u308b\u524d\u306b\u7de8\u96c6\u3057\u3066\u3082\u3088\u304b\u3063\u305f\u304a)\uff0e<br \/>\ndiff\u3092\u3068\u308b\u3068\u6b21\u306e\u611f\u3058\u306b\u306a\u308a\u307e\u3059\uff0e<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n% diff wizard.script.bak wizard.script\r\n 68c68,69\r\n &lt;       local commands_string = g_of_project_dir + _T(&quot;\/..\/..\/scripts\/linux\/createProjects.py &quot;) + g_full_proj_path;\r\n ---\r\n &gt;       local commands_string = _T(&quot;$OF_ROOT\/scripts\/linux\/createProjects.py &quot;) + g_full_proj_path;\r\n<\/pre>\n<p>\u203b\u3053\u306e$OF_ROOT\u306f\u843d\u3068\u3057\u3066\u5c55\u958b\u3057\u305fof_preRelease_v007_linux\u306e\u7d76\u5bfe\u30d1\u30b9\u306b\u7f6e\u63db\u3057\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n<p>\u3053\u308c\u3067Code::Blocks\u3092\u8d77\u52d5\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff0e<br \/>\nFile\u2192New\u2192Project\u3067\u51fa\u305f\u753b\u9762\u306b<br \/>\n<a href=\"http:\/\/daily.belltail.jp\/wp-content\/uploads\/2011\/11\/openfx_proj.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-518 alignnone\" title=\"openfx_proj\" src=\"http:\/\/daily.belltail.jp\/wp-content\/uploads\/2011\/11\/openfx_proj.png\" alt=\"\" width=\"628\" height=\"444\" \/><\/a><br \/>\n\u3084\u3063\u305f\u306d\u2229(\u30fb\u03c9\u30fb)\u2229<\/p>\n<p>**\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u308b\u3068\u304d\u306e\u6ce8\u610f<\/p>\n<p>\u3053\u308c\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u4f5c\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0e<br \/>\n\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u6210\u30a6\u30a3\u30b6\u30fc\u30c9\u306e\u4e2d\u3067\uff0c\u914d\u7f6e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6307\u5b9a\u3059\u308b\u3068\u3053\u308d\u304c\u3042\u308a\u307e\u3059\u304c\uff0c\u305d\u306e\u6642\u306f<b>\u6700\u5f8c\u306b\u30b9\u30e9\u30c3\u30b7\u30e5\u3092\u66f8\u304b\u306a\u3044<\/b>\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\uff0e<br \/>\n\u3053\u308c\u3082wizards.script\u304c\u307e\u305a\u3044\u304b\u3089\u3067\u3059\u3051\u3069\u3082\u2026\uff0e<br \/>\n\u3046\u30fc\u3093\uff0cpatch\u304b\u306a\u3093\u304b\u6295\u3052\u3088\u3046\u304b\u3057\u3089\u3093\uff0e<\/p>\n<p>*\u307a\u308d\u307a\u308d\u3057\u3066\u307f\u307e\u3057\u3087\u3046<\/p>\n<p>\u3055\u3066\uff0c\u3084\u3063\u3068openFrameworks\u3092\u307a\u308d\u307a\u308d\u3067\u304d\u307e\u3059\uff0e<br \/>\n\u307a\u308d\u307a\u308d\u3057\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>**\u307e\u305a\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u6210<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u8ffd\u52a0\u30e9\u30a4\u30d6\u30e9\u30ea\u7121\u3057\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u3063\u3066\u304f\u3060\u3055\u3044\uff0e<br \/>\n\u3053\u3053\u3067\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u307e\u3093\u307e\u3067\u3059\uff0e<\/p>\n<p>\u3053\u3093\u306a\u304b\u3093\u3058\u3067\u30bd\u30fc\u30b9\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u306d\uff0e<\/p>\n<p><a href=\"http:\/\/daily.belltail.jp\/wp-content\/uploads\/2011\/11\/ofx_project_created.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/daily.belltail.jp\/wp-content\/uploads\/2011\/11\/ofx_project_created.png\" alt=\"\" title=\"ofx_project_created\" width=\"540\" height=\"587\" class=\"alignnone size-full wp-image-526\" \/><\/a><\/p>\n<p>\u3067\uff0c\u57fa\u672c\u7684\u306b\u306ftestApp.cpp\u306b\u3054\u306b\u3087\u3054\u306b\u3087\u4ed8\u3051\u52a0\u3048\u3066\u3044\u304f\u304b\u3093\u3058\u306b\u306a\u308a\u307e\u3059\uff0e<\/p>\n<p>\u305d\u306e\u524d\u306b\uff0c\u30d3\u30eb\u30c9\u8a2d\u5b9a\u3092\u3061\u3087\u3063\u3068\u4fee\u6b63\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n<ul>Code::Blocks\u304b\u3089\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u306econfig.make\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\uff0c\u305d\u306eOF_ROOT\u306e\u5024\u3092\uff0c\u9069\u5207\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\uff0e<\/ul>\n<p>\u3064\u3044\u3067\u306b\u50d5\u306fC++0x\u3092\u4f7f\u3044\u305f\u3044\u4eba\u306a\u306e\u3067\uff0cUSER_CFLAGS\u306b&#8221;-std=c++0x&#8221;\u3092\u8ffd\u52a0\u3057\u307e\u3059\uff0e<br \/>\n(\u4ee5\u4e0b\u306e\u30b5\u30f3\u30d7\u30eb\u306f\u3075\u3064\u30fc\u306bC++0x\u4f7f\u3063\u3066\u307e\u3059\uff1e\uff1c\uff1b\uff1b)<\/p>\n<p>**\u4f55\u3082\u306a\u3057\u3067\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046<\/p>\n<p>\u3053\u308c\u3067\u30d3\u30eb\u30c9\u3059\u308b\u3068\u666e\u901a\u306b\u5b9f\u884c\u3067\u304d\u3066\uff0c\u4f55\u3082\u306a\u3044\u753b\u9762\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\uff0e<br \/>\n\u3084\u3063\u305f\u306d\u2229(\u30fb\u03c9\u30fb)\u2229<\/p>\n<p>**\u3061\u3087\u3063\u3068\u3060\u3051\u66f8\u3044\u3066\u307f\u307e\u3057\u3087\u3046<\/p>\n<p>\u3059\u3054\u3044\u3067\u3059\u306d\uff0e\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u304c\u305c\u3093\u3076\u6700\u521d\u304b\u3089\u66f8\u3044\u3066\u3042\u308b\u306e\u3067\u8d85\u30e9\u30af\u3067\u3059\uff0e<br \/>\ndrag\u3082\u3042\u308b\u306e\u3067\uff0c\u30d5\u30e9\u30b0\u3067\u30af\u30ea\u30c3\u30af\u72b6\u614b\u3092\u7ba1\u7406\u3059\u308b\u5fc5\u8981\u3059\u3089\u7121\u3044\uff0e<br \/>\n\u7d20\u6674\u3089\u3057\u3044\u306e\u306f\uff0cSTL\u3060\u308d\u3046\u304cboost\u3060\u308d\u3046\u304c\u4f7f\u3044\u653e\u984c\uff0e<\/p>\n<p>\u3066\u3053\u3068\u3067\uff0c\u308f\u308a\u3068\u3088\u304f\u3042\u308b\uff0c\u8d85\u7c21\u5358\u30da\u30a4\u30f3\u30c8\uff0e\u30c9\u30e9\u30c3\u30b0\u3067\u7dda\u304c\u63cf\u3051\u307e\u3059\uff0e<br \/>\nCtrl+z\u3067\u7121\u9650undo\u6a5f\u80fd\u3068\u304b\uff0cc\u3067\u5168\u6d88\u3057\u3059\u308b\u6a5f\u80fd\u3068\u304b\u3042\u308a\u307e\u3059\uff0e\u305d\u306e\u6c17\u306b\u306a\u308c\u3070redo\u3060\u3063\u3066\u30d7\u30e9\u30b93\u884c\u304f\u3089\u3044\u3067\u66f8\u3051\u307e\u3059\uff0e<\/p>\n<p>-\u30a6\u30a3\u30f3\u30c9\u30a6\u30b5\u30a4\u30ba\u3068\u304b\u306e\u521d\u671f\u8a2d\u5b9a(2\u884c)<br \/>\n-\u7dda\u306e\u4e00\u89a7\u3092\u4fdd\u5b58\u3059\u308bstd::vector\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u7528\u610f<br \/>\n-\u30ad\u30fc\u30a4\u30d9\u30f3\u30c8\u306e\u5b9f\u88c5(6\u884c\u304f\u3089\u3044)<br \/>\n-\u63cf\u753b\u30a4\u30d9\u30f3\u30c8\u306e\u5b9f\u88c5(4\u884c\u304f\u3089\u3044)<\/p>\n<p>\u3053\u308c\u3060\u3051\u3067\u3059\uff0e\u30bd\u30fc\u30b9\u5168\u90e8\u8f09\u305b\u308b\u65b9\u304c\u9577\u3044\u304f\u3089\u3044\uff0e\u8ffd\u8a18\u3057\u305f\u90e8\u5206\u3092\u30cf\u30a4\u30e9\u30a4\u30c8\u3057\u3066\u3044\u307e\u3059\uff0e<br \/>\n\u30af\u30ea\u30c3\u30af\u3067\u5c55\u958b\u3055\u308c\u307e\u3059\uff0e<\/p>\n<pre class=\"brush: cpp; collapse: true; highlight: [4,8]; light: false; title: testApp.h; toolbar: true; notranslate\" title=\"testApp.h\">\r\n#pragma once\r\n\r\n#include &quot;ofMain.h&quot;\r\n#include &lt;vector&gt;\r\n\r\nclass testApp : public ofBaseApp{\r\n\r\n\tstd::vector&lt;std::vector&lt;ofPoint&gt; &gt; lines;\r\n\r\n\tpublic:\r\n\t\tvoid setup();\r\n\t\tvoid update();\r\n\t\tvoid draw();\r\n\r\n\t\tvoid keyPressed  (int key);\r\n\t\tvoid keyReleased(int key);\r\n\t\tvoid mouseMoved(int x, int y );\r\n\t\tvoid mouseDragged(int x, int y, int button);\r\n\t\tvoid mousePressed(int x, int y, int button);\r\n\t\tvoid mouseReleased(int x, int y, int button);\r\n\t\tvoid windowResized(int w, int h);\r\n\t\tvoid dragEvent(ofDragInfo dragInfo);\r\n\t\tvoid gotMessage(ofMessage msg);\r\n\r\n};\r\n<\/pre>\n<pre class=\"brush: cpp; collapse: true; highlight: [5,6,16,17,18,19,24,25,26,27,28,29,30,45,50]; light: false; title: testApp.cpp; toolbar: true; notranslate\" title=\"testApp.cpp\">\r\n#include &quot;testApp.h&quot;\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::setup(){\r\n    ofSetWindowTitle(&quot;fish&quot;);\r\n    ofSetWindowShape(640, 480);\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::update(){\r\n\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::draw(){\r\n    ofSetColor(0, 0, 0);\r\n    for(const std::vector&lt;ofPoint&gt;&amp; line : lines)\r\n        for(unsigned int i = 1; i &lt; line.size(); i++)\r\n            ofLine(line&#x5B;i-1].x, line&#x5B;i-1].y, line&#x5B;i].x, line&#x5B;i].y);\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::keyPressed(int key){\r\n    if(key == ('z' - 'a' + 1))\r\n    {\r\n        if(lines.size())\r\n            lines.pop_back();\r\n    }\r\n    else if(key == 'c')\r\n        lines.clear();\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::keyReleased(int key){\r\n\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::mouseMoved(int x, int y ){\r\n\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::mouseDragged(int x, int y, int button){\r\n    (lines.end()-1)-&gt;push_back(ofPoint(x, y));\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::mousePressed(int x, int y, int button){\r\n    lines.push_back(std::vector&lt;ofPoint&gt;());\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::mouseReleased(int x, int y, int button){\r\n\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::windowResized(int w, int h){\r\n\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::gotMessage(ofMessage msg){\r\n\r\n}\r\n\r\n\/\/--------------------------------------------------------------\r\nvoid testApp::dragEvent(ofDragInfo dragInfo){\r\n\r\n}\r\n<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c:<br \/>\n<a href=\"http:\/\/daily.belltail.jp\/wp-content\/uploads\/2011\/11\/ofx_edit_fish.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/daily.belltail.jp\/wp-content\/uploads\/2011\/11\/ofx_edit_fish.png\" alt=\"\" title=\"ofx_edit_fish\" width=\"642\" height=\"506\" class=\"alignnone size-full wp-image-540\" \/><\/a><br \/>\n\u3055\u304b\u306a\u3067\u3059\uff0e<br \/>\n\u8ab0\u304c\u306a\u3093\u3068\u8a00\u304a\u3046\u3068\u3055\u304b\u306a\u3067\u3059\uff0e<\/p>\n<p>ofx\u306b\u95a2\u3059\u308b\u77e5\u8b58\u30bc\u30ed\u306e\u72b6\u614b\u304b\u3089\u3053\u3053\u307e\u3067\u6b63\u5473\u5341\u6570\u5206\u3068\u3044\u3063\u305f\u3068\u3053\u308d\u304b\uff0e<br \/>\n\u3067\uff0c\u5b9f\u969b\u306b\u8d70\u3089\u305b\u3066\u307f\u3066\u78ba\u8a8d\u3057\u3066\u307b\u3057\u3044\u306e\u3067\u3059\u304c\uff0c\u3080\u3063\u3061\u3083\u8efd\u3044\u3067\u3059\uff0e<\/p>\n<p>*\u3082\u3046\u3061\u3087\u3063\u3068\u300c\u30e1\u30c7\u30a3\u30a2\u30a2\u30fc\u30c8\u300d\u306a\u30b5\u30f3\u30d7\u30eb\u3092\u4f5c\u3063\u3066\u3088\uff01<\/p>\n<p><b>\u3084\u308a\u307e\u3057\u3087\u3046<\/b><\/p>\n<p>\u3061\u3087\u3063\u3068\u5f85\u3063\u3066\u306d<\/p>\n<p>*\u3064\u3044\u3067\u306b<\/p>\n<p>Code::Blocks\u306e\u88dc\u5b8c\u306a\u304b\u306a\u304b\u8ce2\u3044\u3067\u3059\u306d\uff0e<br \/>\n\u50d5\u306fvim\u3067\u305c\u3093\u3076\u6574\u3048\u3066\u308b\u306e\u3067\u305d\u308c\u307b\u3069\u56f0\u3093\u306a\u3044\u3067\u3059\u304c\uff0c\u521d\u5fc3\u8005\u306b\u3059\u3059\u3081\u308b\u3068\u304d\u306fEclipse\u306bCDT\u5165\u308c\u308b\u3088\u308a\u306f\uff0c\u3066\u3044\u3046\u9078\u629e\u80a2\u3082\u3042\u308a\u304b\u3082\uff0e<br \/>\n\u305f\u3060\u30a8\u30c7\u30a3\u30bf\u3068\u3057\u3066\u306f\u3051\u3063\u3053\u3046\u3046\u3093\uff4b\u306a\u304b\u3093\u3058\uff0c\u50d5\u306f\u3084\u3063\u3071\u308a\u5916\u90e8\u30a8\u30c7\u30a3\u30bf\u3067gvim\u3067\u3084\u3063\u3066\u307e\u3059\uff0e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d3\u30b8\u30e5\u30a2\u30e9\u30a4\u30bc\u30fc\u30b7\u30e7\u30f3\u8a00\u8a9e\uff0c\u3059\u306a\u308f\u3061\u624b\u8efd\u306a\u30c7\u30b6\u30a4\u30cb\u30f3\u30b0\u3084\u53ef\u8996\u5316\u306b\u7279\u5316\u3057\u305f\u8a00\u8a9e\u30fb\u74b0\u5883\u3068\u3044\u3048\u3070\uff0cJava\u30d9\u30fc\u30b9\u306eprocessing\u304c\u975e\u5e38\u306b\u6709\u540d\u3067\u3059\uff0e C++\u4e0a\u3067\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u3057\u3066\u63d0\u4f9b\u3055\u308c\u308b\u540c\u69d8\u306e\u3082\u306e\u306b\u306fcinder\u3084open [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[12,7,21],"class_list":["post-516","post","type-post","status-publish","format-standard","hentry","category-1","tag-c","tag-linux","tag-openframeworks"],"_links":{"self":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts\/516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=516"}],"version-history":[{"count":0,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts\/516\/revisions"}],"wp:attachment":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}