Solar System OpenGL v1.0.0
Loading...
Searching...
No Matches
mouse_handler.h
Go to the documentation of this file.
1
9#ifndef MOUSE_HANDLER_H
10#define MOUSE_HANDLER_H
11
12#ifdef __APPLE__
13#include <GLUT/glut.h>
14#else
15#include <GL/glut.h>
16#endif
17
25extern float cameraDistance;
26
34extern float cameraAngleX;
35
43extern float cameraAngleY;
44
52extern int lastMouseX;
53
61extern int lastMouseY;
62
70extern bool leftButtonPressed;
71
80void mouseMotion(int x, int y);
81
92void mouseButton(int button, int state, int x, int y);
93
94#endif // MOUSE_HANDLER_H
float cameraAngleX
Camera angle around the X-axis.
Definition mouse_handler.cpp:19
float cameraDistance
Distance of the camera from the target.
Definition keyboard_handler.cpp:28
float cameraAngleY
Camera angle around the Y-axis.
Definition mouse_handler.cpp:28
void mouseMotion(int x, int y)
Handles mouse motion events.
Definition mouse_handler.cpp:66
int lastMouseY
Y-coordinate of the last mouse position.
Definition mouse_handler.cpp:46
int lastMouseX
X-coordinate of the last mouse position.
Definition mouse_handler.cpp:37
bool leftButtonPressed
State of the left mouse button.
Definition mouse_handler.cpp:55
void mouseButton(int button, int state, int x, int y)
Handles mouse button events.
Definition mouse_handler.cpp:100