{"id":886,"date":"2009-09-04T19:27:00","date_gmt":"2009-09-04T18:27:00","guid":{"rendered":"http:\/\/it4bus.vn\/itersdesktop\/2009\/09\/04\/interaction-with-mouse-in-opengl-part-1\/"},"modified":"2013-12-01T01:29:38","modified_gmt":"2013-12-01T00:29:38","slug":"interaction-with-mouse-in-opengl-part-1","status":"publish","type":"post","link":"https:\/\/www.itersdesktop.com\/fr\/2009\/09\/04\/interaction-with-mouse-in-opengl-part-1\/","title":{"rendered":"Interaction with Mouse in OpenGL (Part 1)"},"content":{"rendered":"<p><a href=\"http:\/\/www.cytoscape.org\/\" target=\"_blank\">Cytoscape<\/a><br \/>\n<a href=\"http:\/\/www.3dkingdoms.com\/selection.html\" target=\"_blank\">Selection Objects (www.3dkingdoms.com)<\/a><br \/>\n<a href=\"http:\/\/www.biolayout.org\/\" target=\"_blank\">BioLayout Express 3D<\/a>, click <a href=\"http:\/\/www.ebi.ac.uk\/enright\/docs\/16000016.pdf\">here<\/a> to get more details of BioLayoutJava<br \/>\n<a href=\"http:\/\/www.cs.rpi.edu\/research\/groups\/pb\/graphdraw\/\" target=\"_blank\">Interactive Graph Drawing<\/a> is an open source for drawing interactive graph drawing on the WWW, inspired by Arthur van Hoff&rsquo;s early GraphLayout Java demonstration applet. He implemented how to select and move nodes on the graph.<br \/>\n<a href=\"http:\/\/visant.bu.edu\/\">VisAnt<\/a> is an Integrative Visual Analysis Tool for Biological Networks and Pathways. Currently, there is not available source code.<\/p>\n<hr \/>\n<pre><span>\/* Function prototypes *\/<\/span>\r\n<span>\/*\r\n* Retrieve the current state of the mouse.\r\n* The current button state is returned as a button bitmask, which can\r\n* be tested using the SDL_BUTTON(X) macros, and x and y are set to the\r\n* current mouse cursor position.  You can pass NULL for either x or y.\r\n*\/<\/span>\r\n<span>extern<\/span> DECLSPEC Uint8 SDLCALL SDL_GetMouseState(<span>int<\/span> *x, <span>int<\/span> *y);\r\n\r\nWith:\r\n<span>\/* Used as a mask when testing buttons in buttonstate\r\nButton 1: Left mouse button\r\nButton 2: Middle mouse button\r\nButton 3: Right mouse button\r\nButton 4: Mouse wheel up  (may also be a real button)\r\nButton 5: Mouse wheel down (may also be a real button)\r\n*\/<\/span>\r\n<span>#define<\/span> SDL_BUTTON(X)  (<span>1<\/span> &lt; &lt; ((X)-<span>1))\r\n<span>#define<\/span> SDL_BUTTON_LEFT  <span>1<\/span>\r\n<span>#define<\/span> SDL_BUTTON_MIDDLE <span>2<\/span>\r\n<span>#define<\/span> SDL_BUTTON_RIGHT <span>3<\/span>\r\n<span>#define<\/span> SDL_BUTTON_WHEELUP <span>4<\/span>\r\n<span>#define<\/span> SDL_BUTTON_WHEELDOWN <span>5<\/span>\r\n<span>#define<\/span> SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT)\r\n<span>#define<\/span> SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE)\r\n<span>#define<\/span> SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT)\r\n\r\n<a href=\"http:\/\/www.itersdesktop.com\/wp-content\/uploads\/2009\/09\/translation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-988 aligncenter\" alt=\"translation\" src=\"http:\/\/www.itersdesktop.com\/wp-content\/uploads\/2009\/09\/translation.png\" width=\"385\" height=\"328\" srcset=\"https:\/\/www.itersdesktop.com\/wp-content\/uploads\/2009\/09\/translation.png 385w, https:\/\/www.itersdesktop.com\/wp-content\/uploads\/2009\/09\/translation-300x255.png 300w\" sizes=\"auto, (max-width: 385px) 100vw, 385px\" \/><\/a> <a href=\"http:\/\/www.itersdesktop.com\/wp-content\/uploads\/2009\/09\/rotation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-985 aligncenter\" alt=\"rotation\" src=\"http:\/\/www.itersdesktop.com\/wp-content\/uploads\/2009\/09\/rotation.png\" width=\"336\" height=\"319\" srcset=\"https:\/\/www.itersdesktop.com\/wp-content\/uploads\/2009\/09\/rotation.png 336w, https:\/\/www.itersdesktop.com\/wp-content\/uploads\/2009\/09\/rotation-300x284.png 300w\" sizes=\"auto, (max-width: 336px) 100vw, 336px\" \/><\/a>\r\n<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Cytoscape Selection Objects (www.3dkingdoms.com) BioLayout Express 3D, click here to get more details of BioLayoutJava Interactive Graph Drawing is an open source for drawing interactive graph drawing on the WWW,&hellip; <\/p>\n","protected":false},"author":2,"featured_media":986,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,284],"tags":[575,321,320],"class_list":["post-886","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpp","category-opengl","tag-opengl","tag-sdl","tag-mouse-interaction"],"_links":{"self":[{"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/posts\/886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/comments?post=886"}],"version-history":[{"count":3,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/posts\/886\/revisions"}],"predecessor-version":[{"id":990,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/posts\/886\/revisions\/990"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/media\/986"}],"wp:attachment":[{"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/media?parent=886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/categories?post=886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/tags?post=886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}