Public Methods | |
Mouse () | |
int | pickObject (double x, double y, double delX, double delY) |
int | processHits (int hits, int buffer[]) |
vec3 | getPointFromPick (const int x, const int y, int *viewport) |
int | getPickResult (void) |
void | mouseDblClick (int x, int y) |
void | mousePressed (int button, int x, int y) |
void | mouseReleased (int button, int x, int y) |
void | mouseMotion (int button, int x, int y) |
Data Fields | |
vec2i | sceneOwnRot |
(should be computed in camera) | |
int | moveVolume |
index of the super volume selected NO_VOLUME_SELECTED if none | |
Camera * | camera |
here to bind mouse movement to camera movement | |
int | viewMode |
solid, wireframe, ... | |
vec3 | pickPoint |
picking point in world coordinates | |
Private Attributes | |
vec2i | vstart |
start position of a drag | |
int | selectBuf [SELECT_BUFSIZE] |
selection buffer to store picking data |
|
Constructor, inits mouse properties |
|
2nd part of the picking operation as seen from exterior it returns the identity of the pick point |
|
Gives the world coordinates of the 3D point picked from the mouse coordinates of the picking point <x,y> in screen |
|
Procedure called in case of double click event detected This is only the primary operation, the picking needs to be finalised by getPickResult
|
|
Alters display during a mouse motion with button pressed (translation or rotation or object picking) called by the callback mouseMotion |
|
Mouse handling for button pressed
|
|
Mouse handling for button released
|
|
Starts the picking, defining the area and selection buffer on the rectangle <x,y ; delx,dely> this method is described in a lot of tutorials on the web
|
|
Returns the name of the closest hit from the content of the selection array.
|
|
here to bind mouse movement to camera movement
|
|
index of the super volume selected NO_VOLUME_SELECTED if none
|
|
picking point in world coordinates
|
|
(should be computed in camera)
|
|
selection buffer to store picking data
|
|
solid, wireframe, ...
|
|
start position of a drag
|