00001
00002
00003
00004
00005
00006
00008
00010
00011
00012
00013
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
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
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