#include <MouseSensor.h>
Inheritance diagram for H3D::MouseSensor:

Public Member Functions | |
| MouseSensor (Inst< SFBool > _enabled=0, Inst< SFNode > _metadata=0, Inst< SFBool > _isActive=0, Inst< SFVec2f > _position=0, Inst< SFBool > _leftButton=0, Inst< SFBool > _middleButton=0, Inst< SFBool > _rightButton=0, Inst< SFVec2f > _motion=0, Inst< SFBool > _scrollUp=0, Inst< SFBool > _scrollDown=0) | |
| Constructor. | |
| virtual | ~MouseSensor () |
| Destructor. | |
| void | addGLUTMouseMotionAction (int x, int y) |
| Will be called when the mouse has moved. | |
| virtual void | addGLUTMouseButtonAction (int button, int state) |
| Will be called when a mouse button event occurs. | |
| virtual void | addGLUTMouseWheelAction (int wheel, int direction) |
| Will be called when a mouse scroll wheel event occurs. | |
Static Public Member Functions | |
| static void | glutMouseCallback (int button, int state, int x, int y) |
| glut callback function. | |
| static void | glutMotionCallback (int x, int y) |
| glut callback function. | |
| static void | glutMouseWheelCallback (int wheel, int direction, int x, int y) |
| glut callback function for mouse scroll wheel. | |
Public Attributes | |
| auto_ptr< SFVec2f > | position |
| The position of the mouse in window relative coordinates. | |
| auto_ptr< SFBool > | leftButton |
| The status of the left button. | |
| auto_ptr< SFBool > | middleButton |
| The status of the middle button. | |
| auto_ptr< SFBool > | rightButton |
| The status of the right button. | |
| auto_ptr< SFVec2f > | motion |
| The relative motion since in the last change of the position field. | |
| auto_ptr< SFBool > | scrollUp |
| The scrollUp field generates a TRUE event when the mouse scroll wheel is moved up. | |
| auto_ptr< SFBool > | scrollDown |
| The scrollDown field generates a TRUE event when the mouse scroll wheel is moved down. | |
Static Public Attributes | |
| static H3DNodeDatabase | database |
| The H3DNodeDatabase for this node. | |
The scrollUp and scrollDown fields will only be usable if you are compiling against freeglut instead of GLUT.
|
||||||||||||
|
Will be called when a mouse button event occurs.
|
|
||||||||||||
|
Will be called when the mouse has moved. The x and y parameters indicate the mouse location in window relative coordinates. |
|
||||||||||||
|
glut callback function. Calls addGLUTMouseMotionAction() on all MouseSensor instances. |
|
||||||||||||||||||||
|
glut callback function. Calls addGLUTMouseButtonAction() on all MouseSensor instances. |
|
|
The status of the left button. TRUE indicates that it is pressed. Access type: outputOnly |
|
|
The status of the middle button. TRUE indicates that it is pressed. Access type: outputOnly |
|
|
The relative motion since in the last change of the position field. Access type: outputOnly |
|
|
The position of the mouse in window relative coordinates. Access type: outputOnly |
|
|
The status of the right button. TRUE indicates that it is pressed. Access type: outputOnly |
|
|
The scrollDown field generates a TRUE event when the mouse scroll wheel is moved down. Access type: outputOnly |
|
|
The scrollUp field generates a TRUE event when the mouse scroll wheel is moved up. Access type: outputOnly |
1.4.5