Pages

Saturday, September 5, 2009

Interaction with Mouse in OpenGL (Part 1)

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, inspired by Arthur van Hoff's early GraphLayout Java demonstration applet. He implemented how to select and move nodes on the graph.
VisAnt is an Integrative Visual Analysis Tool for Biological Networks and Pathways. Currently, there is not available source code.

/* Function prototypes */
/*
* Retrieve the current state of the mouse.
* The current button state is returned as a button bitmask, which can
* be tested using the SDL_BUTTON(X) macros, and x and y are set to the
* current mouse cursor position.  You can pass NULL for either x or y.
*/
extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y);

With:
/* Used as a mask when testing buttons in buttonstate
Button 1: Left mouse button
Button 2: Middle mouse button
Button 3: Right mouse button
Button 4: Mouse wheel up  (may also be a real button)
Button 5: Mouse wheel down (may also be a real button)
*/
#define SDL_BUTTON(X)  (1 << ((X)-1))
#define SDL_BUTTON_LEFT  1
#define SDL_BUTTON_MIDDLE 2
#define SDL_BUTTON_RIGHT 3
#define SDL_BUTTON_WHEELUP 4
#define SDL_BUTTON_WHEELDOWN 5
#define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT)
#define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE)
#define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT)


3 comments:

  1. OpenGL:Tutorials:Picking (http://gpwiki.org/index.php/OpenGL:Tutorials:Picking)

    Moving Object in 3D with mouse (http://www.gamedev.net/community/forums/topic.asp?topic_id=543827)

    Picking with a mouse (http://www.hitl.washington.edu/artoolkit/mail-archive/message-thread-00483-Picking-with-a-mouse.html)

    Mouse picking (http://www.kencocomputers.com/tutorials/lesson_5.htm)

    ReplyDelete
  2. 3D Manipulators (http://www.ziggyware.com/readarticle.php?article_id=189)
    Dragging a 2D object with mouse (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=241470)

    ReplyDelete