前回のnurbsとhemeshを組み合わせて、なにか凝ったモノをつくろうとして挫折。そもそも、JOGLのnurbsが未実装だった。 というわけで、今回もTipsっぽい記事。openframeworkでポリゴンのマウスクリックや、マウスオーバーの判定を取る方法。 地道に座標を変換して照合していくことももちろん可能だが、openglにマウスピック用のAPIがすでに用意されているので、それを試してみた。 参考したのは以下のサイト Picking Tutorial [OpenGL] マウスピッキング ※カメラやライトの設定にofx3dutilsというアドオンを(あと、ofxVectorMathも)使用しています testApp.h #ifndef _TEST_APP #define _TEST_APP #include "ofMain.h" #include "ofxEasyCam.h" #inc