66 #ifndef GLUT_PERSPECTIVE_CAMERA_H_
67 #define GLUT_PERSPECTIVE_CAMERA_H_
73 #include <GLUT/glut.h>
83 #define GLUT_PC_DECREMENT_CHARACTER 'j'
84 #define GLUT_PC_INCREMENT_CHARACTER 'k'
85 #define GLUT_PC_NUMBER_OF_CAMERA_PARAMETERS 16
110 bool enable_translation =
true,
bool enable_pitch =
true,
bool enable_yaw =
true,
bool enable_roll =
true,
111 bool enable_focal_length =
true,
bool enable_principal_point =
true,
bool enable_skew =
true,
112 bool enable_aspect_ratio =
true,
bool enable_world_scale =
true,
bool enable_clipping =
true,
113 bool enable_viewport =
true,
bool icentre_when_scaling_viewport =
true,
208 static bool camera_enabled;
209 static unsigned int selected_parameter;
212 static unsigned char increment_character;
213 static unsigned char decrement_character;
219 static bool centre_when_scaling_viewport;
222 static void (*camera_submenu_callback)(
int i);
static void update_pitch_increment(double iincrement)
sets the increment step used for the pitch
Definition: glut_perspective_camera.h:181
static double retrieve_focal_length_increment()
returns the increment step used for the focal length
Definition: glut_perspective_camera.h:154
Definition: glut_perspective_camera.h:81
Definition: glut_perspective_camera.h:79
static void update_translation_y_increment(double iincrement)
sets the increment step used for the y-coordinate of the camera centre
Definition: glut_perspective_camera.h:177
static double retrieve_translation_x_increment()
returns the increment step used for the x-coordinate of the camera centre
Definition: glut_perspective_camera.h:142
static void update_near_clipping_increment(double iincrement)
sets the increment step used for the near clipping plane
Definition: glut_perspective_camera.h:199
static void update_principal_point_y_increment(double iincrement)
sets the increment step used for the y coordinate of the principal point
Definition: glut_perspective_camera.h:191
static double retrieve_width_increment()
returns the increment step used for the viewport width
Definition: glut_perspective_camera.h:170
static void update_height_increment(double iincrement)
sets the increment step used for the viewport height
Definition: glut_perspective_camera.h:205
static void update_yaw_increment(double iincrement)
sets the increment step used for the yaw
Definition: glut_perspective_camera.h:183
Definition: glut_perspective_camera.h:80
static void update_far_clipping_increment(double iincrement)
sets the increment step used for the far clipping plane
Definition: glut_perspective_camera.h:201
static void update_principal_point_x_increment(double iincrement)
sets the increment step used for the x coordinate of the principal point
Definition: glut_perspective_camera.h:189
static double retrieve_far_clipping_increment()
returns the increment step used for the far clipping plane
Definition: glut_perspective_camera.h:168
static void update_translation_x_increment(double iincrement)
sets the increment step used for the x-coordinate of the camera centre
Definition: glut_perspective_camera.h:175
Definition: glut_perspective_camera.h:81
static void enable_camera()
Enables the camera. When the camera is not enabled all submenu selections and the submenu keyboard ca...
Definition: glut_perspective_camera.h:133
#define GLUT_PC_DECREMENT_CHARACTER
Definition: glut_perspective_camera.h:83
static int create_glut_perspective_camera_submenu(void(*icamera_submenu_callback)(int i), kjb::Perspective_camera *pc, bool enable_translation=true, bool enable_pitch=true, bool enable_yaw=true, bool enable_roll=true, bool enable_focal_length=true, bool enable_principal_point=true, bool enable_skew=true, bool enable_aspect_ratio=true, bool enable_world_scale=true, bool enable_clipping=true, bool enable_viewport=true, bool icentre_when_scaling_viewport=true, unsigned char iincrement_char=GLUT_PC_INCREMENT_CHARACTER, unsigned char idecrement_char=GLUT_PC_DECREMENT_CHARACTER)
Definition: glut_perspective_camera.cpp:88
#define GLUT_PC_INCREMENT_CHARACTER
Definition: glut_perspective_camera.h:84
static double retrieve_yaw_increment()
returns the increment step used for the yaw
Definition: glut_perspective_camera.h:150
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
Definition: glut_perspective_camera.h:79
static double retrieve_skew_increment()
returns the increment step used for the skew
Definition: glut_perspective_camera.h:160
Definition: glut_perspective_camera.h:79
static double retrieve_roll_increment()
returns the increment step used for the roll
Definition: glut_perspective_camera.h:152
static double retrieve_principal_point_y_increment()
returns the increment step used for the y coordinate of the principal point
Definition: glut_perspective_camera.h:158
St_perspective_camera for modeling a perspective camera using the classic Forsyth and Ponce parametri...
static void disable_camera()
Disable the camera. When the camera is not enabled all submenu selections and the submenu keyboard ca...
Definition: glut_perspective_camera.h:139
static void camera_submenu_glut(int i)
This callback will be executed any time an entry of the camera submenu is selected. This is automatically called. Within this function the user defined callback will be called.
Definition: glut_perspective_camera.cpp:175
static double retrieve_height_increment()
returns the increment step used for the viewport height
Definition: glut_perspective_camera.h:172
static void update_skew_increment(double iincrement)
sets the increment step used for the skew
Definition: glut_perspective_camera.h:193
Definition: perspective_camera.h:93
static double retrieve_aspect_ratio_increment()
returns the increment step used for the aspect ratio
Definition: glut_perspective_camera.h:162
Definition: glut_perspective_camera.h:106
Definition: glut_perspective_camera.h:79
static void update_focal_length_increment(double iincrement)
sets the increment step used for the focal length
Definition: glut_perspective_camera.h:187
Definition: glut_perspective_camera.h:80
static double retrieve_world_scale_increment()
returns the increment step used for the world scale
Definition: glut_perspective_camera.h:164
static void update_width_increment(double iincrement)
sets the increment step used for the viewport width
Definition: glut_perspective_camera.h:203
Definition: glut_perspective_camera.h:80
static double retrieve_translation_y_increment()
returns the increment step used for the y-coordinate of the camera centre
Definition: glut_perspective_camera.h:144
static void update_world_scale_increment(double iincrement)
sets the increment step used for the world scale
Definition: glut_perspective_camera.h:197
Definition: glut_perspective_camera.h:80
Definition: glut_perspective_camera.h:80
Definition: glut_perspective_camera.h:79
static void update_aspect_ratio_increment(double iincrement)
sets the increment step used for the aspect ratio
Definition: glut_perspective_camera.h:195
get the indices of edges in each direction for i
Definition: APPgetLargeConnectedEdges.m:48
Definition: glut_perspective_camera.h:79
static double retrieve_pitch_increment()
returns the increment step used for the pitch
Definition: glut_perspective_camera.h:148
static double retrieve_translation_z_increment()
returns the increment step used for the z-coordinate of the camera centre
Definition: glut_perspective_camera.h:146
static void keyboard_callback(unsigned char key)
This is the keyboard_callback for this camera submenu. The user HAS to call this in the GLUT keyboard...
Definition: glut_perspective_camera.cpp:182
Definition: glut_perspective_camera.h:81
Definition for the Vector class, a thin wrapper on the KJB Vector struct and its related functionalit...
static double retrieve_near_clipping_increment()
returns the increment step used for the near clipping plane
Definition: glut_perspective_camera.h:166
static void update_translation_z_increment(double iincrement)
sets the increment step used for the z-coordinate of the camera centre
Definition: glut_perspective_camera.h:179
Definition: glut_perspective_camera.h:81
static double retrieve_principal_point_x_increment()
returns the increment step used for the x coordinate of the principal point
Definition: glut_perspective_camera.h:156
static void update_roll_increment(double iincrement)
sets the increment step used for the roll
Definition: glut_perspective_camera.h:185
Definition: glut_perspective_camera.h:81