KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | List of all members
kjb::Glut_parapiped Class Reference

#include <glut_parapiped.h>

Static Public Member Functions

static int create_glut_parapiped_submenu (void(*iparapiped_submenu_callback)(int i), Parametric_parapiped *pa, bool enable_translation=true, bool enable_pitch=true, bool enable_yaw=true, bool enable_roll=true, bool enable_width=true, bool enable_height=true, bool enable_length=true, unsigned char iincrement_char=GLUT_PA_INCREMENT_CHARACTER, unsigned char idecrement_char=GLUT_PA_DECREMENT_CHARACTER)
 
static void parapiped_submenu_glut (int i)
 This callback will be executed any time an entry of the parapiped submenu is selected. This is automatically called. Within this function the user defined callback will be called. More...
 
static void keyboard_callback (unsigned char key)
 This is the keyboard_callback for this parapiped submenu. The user HAS to call this in the GLUT keyboard callback when appropriate. More...
 
static void enable_parapiped ()
 Enables the parapiped. When the camera is not enabled all submenu selections and the submenu keyboard callback have no effect. More...
 
static void disable_parapiped ()
 Disables the parapiped. When the camera is not enabled all submenu selections and the submenu keyboard callback have no effect. More...
 
static double retrieve_translation_x_increment ()
 returns the increment step used for the x-coordinate of the centre More...
 
static double retrieve_translation_y_increment ()
 returns the increment step used for the y-coordinate of the centre More...
 
static double retrieve_translation_z_increment ()
 returns the increment step used for the z-coordinate of the centre More...
 
static double retrieve_pitch_increment ()
 returns the increment step used for the pitch More...
 
static double retrieve_yaw_increment ()
 returns the increment step used for the yaw More...
 
static double retrieve_roll_increment ()
 returns the increment step used for the roll More...
 
static double retrieve_width_increment ()
 returns the increment step used for the width (along x axis) More...
 
static double retrieve_height_increment ()
 returns the increment step used for the height (along y axis) More...
 
static double retrieve_length_increment ()
 returns the increment step used for the length (along z axis) More...
 
static void update_translation_x_increment (double iincrement)
 sets the increment step used for the x-coordinate of the centre More...
 
static void update_translation_y_increment (double iincrement)
 sets the increment step used for the y-coordinate of the centre More...
 
static void update_translation_z_increment (double iincrement)
 sets the increment step used for the z-coordinate of the centre More...
 
static void update_pitch_increment (double iincrement)
 sets the increment step used for the pitch More...
 
static void update_yaw_increment (double iincrement)
 sets the increment step used for the yaw More...
 
static void update_roll_increment (double iincrement)
 sets the increment step used for the roll More...
 
static void update_width_increment (double iincrement)
 sets the increment step used for the width (along x axis) More...
 
static void update_height_increment (double iincrement)
 sets the increment step used for the height (along y axis) More...
 
static void update_lenght_increment (double iincrement)
 sets the increment step used for the length (along z axis) More...
 

Detailed Description

provides an easy way to add a glut submenu that handles a full parametric parapiped to your application. This class only creates the menu, it's up to the user to add it to the main glut menu. Upon creation of the submenu, the user has to provide a callback (parapiped_submenu_callback) that will be called every time one entry in the parapiped submenu will be selected. Optionally, an empty callback can be passed, if the user does not need to take any further action. It is also up to the user to call the keyboard_callback provided in this class in the glut keyboard callback when appropriate. This class provides a submenu entry for each parameter of the camera. Upon selection, the keys 'j' and 'k' allow the user to increment or decrement the value of each parameter by the increment_step for that parameter. Each increment_step can be specified by the user. The user can also decide to use different characters (ie characters other than 'j' and 'k').

Member Function Documentation

int Glut_parapiped::create_glut_parapiped_submenu ( void(*)(int i iparapiped_submenu_callback,
Parametric_parapiped pa,
bool  enable_translation = true,
bool  enable_pitch = true,
bool  enable_yaw = true,
bool  enable_roll = true,
bool  enable_width = true,
bool  enable_height = true,
bool  enable_length = true,
unsigned char  iincrement_char = GLUT_PA_INCREMENT_CHARACTER,
unsigned char  idecrement_char = GLUT_PA_DECREMENT_CHARACTER 
)
static
static void kjb::Glut_parapiped::disable_parapiped ( )
inlinestatic

Disables the parapiped. When the camera is not enabled all submenu selections and the submenu keyboard callback have no effect.

static void kjb::Glut_parapiped::enable_parapiped ( )
inlinestatic

Enables the parapiped. When the camera is not enabled all submenu selections and the submenu keyboard callback have no effect.

void Glut_parapiped::keyboard_callback ( unsigned char  key)
static

This is the keyboard_callback for this parapiped submenu. The user HAS to call this in the GLUT keyboard callback when appropriate.

void Glut_parapiped::parapiped_submenu_glut ( int  i)
static

This callback will be executed any time an entry of the parapiped submenu is selected. This is automatically called. Within this function the user defined callback will be called.

static double kjb::Glut_parapiped::retrieve_height_increment ( )
inlinestatic

returns the increment step used for the height (along y axis)

static double kjb::Glut_parapiped::retrieve_length_increment ( )
inlinestatic

returns the increment step used for the length (along z axis)

static double kjb::Glut_parapiped::retrieve_pitch_increment ( )
inlinestatic

returns the increment step used for the pitch

static double kjb::Glut_parapiped::retrieve_roll_increment ( )
inlinestatic

returns the increment step used for the roll

static double kjb::Glut_parapiped::retrieve_translation_x_increment ( )
inlinestatic

returns the increment step used for the x-coordinate of the centre

static double kjb::Glut_parapiped::retrieve_translation_y_increment ( )
inlinestatic

returns the increment step used for the y-coordinate of the centre

static double kjb::Glut_parapiped::retrieve_translation_z_increment ( )
inlinestatic

returns the increment step used for the z-coordinate of the centre

static double kjb::Glut_parapiped::retrieve_width_increment ( )
inlinestatic

returns the increment step used for the width (along x axis)

static double kjb::Glut_parapiped::retrieve_yaw_increment ( )
inlinestatic

returns the increment step used for the yaw

static void kjb::Glut_parapiped::update_height_increment ( double  iincrement)
inlinestatic

sets the increment step used for the height (along y axis)

static void kjb::Glut_parapiped::update_lenght_increment ( double  iincrement)
inlinestatic

sets the increment step used for the length (along z axis)

static void kjb::Glut_parapiped::update_pitch_increment ( double  iincrement)
inlinestatic

sets the increment step used for the pitch

static void kjb::Glut_parapiped::update_roll_increment ( double  iincrement)
inlinestatic

sets the increment step used for the roll

static void kjb::Glut_parapiped::update_translation_x_increment ( double  iincrement)
inlinestatic

sets the increment step used for the x-coordinate of the centre

static void kjb::Glut_parapiped::update_translation_y_increment ( double  iincrement)
inlinestatic

sets the increment step used for the y-coordinate of the centre

static void kjb::Glut_parapiped::update_translation_z_increment ( double  iincrement)
inlinestatic

sets the increment step used for the z-coordinate of the centre

static void kjb::Glut_parapiped::update_width_increment ( double  iincrement)
inlinestatic

sets the increment step used for the width (along x axis)

static void kjb::Glut_parapiped::update_yaw_increment ( double  iincrement)
inlinestatic

sets the increment step used for the yaw


The documentation for this class was generated from the following files: