Main Page   Namespace List   Alphabetical List   Data Structures   File List   Data Fields   Globals  

mouse.h

Go to the documentation of this file.
00001 
00002 //                          mouse.h                                     //
00003 //                         ---------                                    //
00004 //    begin                : Mon Nov 03 2003                            //
00005 //    copyright            : (C) 2003 by cbaudry (CEA/DSM/SPP)          //
00006 //    email                : cedric.baudry@tremplin-utc.fr              //
00008 
00010 //                                                                        //
00011 //   This program is free software; you can redistribute it and/or modify //
00012 //   it under the terms of the GNU General Public License as published by //
00013 //   the Free Software Foundation, version 2 of the License               //
00014 //                                                                        //
00016 
00017 #pragma once
00018 
00019 #include "camera.h"
00020 #include "structure.h"
00021 
00022 
00024 #define NO_VOLUME_SELECTED        -1
00025 #define SELECT_BUFSIZE 1024     
00026 
00027 
00030 enum MODE_VIEW
00031 {
00032     MODE_VIEW_ALL_LINES,
00033     MODE_VIEW_LINES,
00034     MODE_VIEW_LINES_NOHL,
00035     MODE_VIEW_POLY,
00036     MODE_VIEW_POLY_EDGES
00037 };
00038 
00039 
00047 class Mouse
00048 {
00049   private:
00050     vec2i vstart;                   
00051     int selectBuf[SELECT_BUFSIZE];  
00052 
00053   public:
00054     Mouse ( );          
00055   
00056     vec2i sceneOwnRot;   
00057     int moveVolume;      
00058 
00059     Camera *camera;      
00060     int viewMode;        
00061 
00062     //picking
00063     vec3 pickPoint;      
00064     
00065     int pickObject (double x, double y, double delX, double delY); 
00066     int processHits (int hits, int buffer[]);                         
00067     vec3 getPointFromPick (const int x, const int y, int * viewport);
00068     int getPickResult(void);
00069     
00070     //mouse handling
00071     void mouseDblClick (int x, int y);
00072     void mousePressed (int button, int x, int y);  
00073     void mouseReleased (int button, int x, int y); 
00074     void mouseMotion (int button, int x, int y);   
00075 
00076 };
00077 

Generated on Wed Feb 18 16:32:50 2004 for POVAMA by doxygen1.2.18