Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

exquat(3alleg4) [osx man page]

exquat(3alleg4) 						  Allegro manual						   exquat(3alleg4)

NAME
exquat - A comparison between Euler angles and quaternions. Allegro game programming library. SYNOPSIS
#include <allegro.h> Example exquat DESCRIPTION
Euler angles are convenient for storing and creating 3D orientations. However, this program demonstrates that they are not good when interpolating between two different orientations. The problem is solved by using Allegro's quaternion operations. In this program, two cubes are rotated between random orientations. Notice that although they have the same beginning and ending orienta- tions, they do not follow the same path between orientations. One cube is being rotated by directly incrementing or decrementing the Euler angles from the starting point to the ending point. This is an intuitive notion, but it is incorrect because it does not cause the object to turn around a single unchanging axis of rotation. The axis of rotation wobbles resulting in the object spinning in strange ways. The object will eventually end up in the orientation that the user intended, but it gets there in a way that is unattractive. Imagine if this method was used to update the position of a camera in a game! Sometimes it would swing wildly and disorient the player. The other cube is animated using quaternions. This results in a much more pleasing animation because the cube turns around a single axis of rotation. SEE ALSO
BITMAP(3alleg4), END_OF_MAIN(3alleg4), MATRIX_f(3alleg4), QUAT(3alleg4), acquire_bitmap(3alleg4), allegro_error(3alleg4), alle- gro_init(3alleg4), allegro_message(3alleg4), apply_matrix_f(3alleg4), blit(3alleg4), circle(3alleg4), clear_keybuf(3alleg4), clear_to_color(3alleg4), create_bitmap(3alleg4), desktop_palette(3alleg4), destroy_bitmap(3alleg4), font(3alleg4), get_cam- era_matrix_f(3alleg4), get_rotation_matrix(3alleg4), get_rotation_matrix_f(3alleg4), get_rotation_quat(3alleg4), install_keyboard(3alleg4), keypressed(3alleg4), line(3alleg4), matrix_mul_f(3alleg4), palette_color(3alleg4), persp_project_f(3alleg4), quat_interpolate(3alleg4), quat_to_matrix(3alleg4), readkey(3alleg4), release_bitmap(3alleg4), rest(3alleg4), screen(3alleg4), set_gfx_mode(3alleg4), set_pal- ette(3alleg4), set_projection_viewport(3alleg4), textout_ex(3alleg4) Allegro version 4.4.2 exquat(3alleg4)

Check Out this Related Man Page

exzbuf(3alleg4) 						  Allegro manual						   exzbuf(3alleg4)

NAME
exzbuf - Z-buffered polygons demo. Allegro game programming library. SYNOPSIS
#include <allegro.h> Example exzbuf DESCRIPTION
This program demonstrates how to use Z-buffered polygons and floating point 3D math routines. It also provides a simple way to compute fps (frames per second) using a timer. After selecting a screen resolution through the standard GUI dialog, the example shows two 3D cubes rotating and intersecting each other. Rather than having full polygons incorrectly overlap other polygons due to per-polygon sorting, each pixel is drawn at the correct depth. SEE ALSO
BITMAP(3alleg4), END_OF_FUNCTION(3alleg4), END_OF_MAIN(3alleg4), LOCK_FUNCTION(3alleg4), LOCK_VARIABLE(3alleg4), MATRIX_f(3alleg4), PAL- ETTE(3alleg4), POLYTYPE_GCOL(3alleg4), SCREEN_H(3alleg4), SCREEN_W(3alleg4), V3D_f(3alleg4), ZBUFFER(3alleg4), allegro_error(3alleg4), allegro_exit(3alleg4), allegro_init(3alleg4), allegro_message(3alleg4), apply_matrix_f(3alleg4), bitmap_color_depth(3alleg4), blit(3alleg4), clear_bitmap(3alleg4), clear_zbuffer(3alleg4), create_bitmap(3alleg4), create_zbuffer(3alleg4), desktop_palette(3alleg4), destroy_bitmap(3alleg4), destroy_zbuffer(3alleg4), font(3alleg4), get_transformation_matrix_f(3alleg4), gfx_mode_select_ex(3alleg4), install_int(3alleg4), install_keyboard(3alleg4), install_mouse(3alleg4), install_timer(3alleg4), keypressed(3alleg4), pal- ette_color(3alleg4), persp_project_f(3alleg4), polygon_z_normal_f(3alleg4), quad3d_f(3alleg4), readkey(3alleg4), screen(3alleg4), set_color_depth(3alleg4), set_gfx_mode(3alleg4), set_palette(3alleg4), set_palette_range(3alleg4), set_projection_viewport(3alleg4), set_zbuffer(3alleg4), textprintf_ex(3alleg4), vsync(3alleg4) Allegro version 4.4.2 exzbuf(3alleg4)
Man Page