Permalink
Browse files

Trim trailing spaces and set permissions to non-executable for GLUI s…

…ources
  • Loading branch information...
nigels-com committed Dec 7, 2015
1 parent bd1524b commit 50d466b9d7911cdd8cc3459f7b9ddf3acfbf3b0a
Showing with 2,565 additions and 2,565 deletions.
  1. +498 −498 algebra3.cpp
  2. +26 −26 algebra3.h
  3. +27 −27 arcball.cpp
  4. +22 −22 arcball.h
  5. +153 −153 glui.cpp
  6. +35 −35 glui_add_controls.cpp
  7. +7 −7 glui_bitmap_img_data.cpp
  8. +10 −10 glui_bitmaps.cpp
  9. +10 −10 glui_button.cpp
  10. +21 −21 glui_checkbox.cpp
  11. +17 −17 glui_column.cpp
  12. +23 −23 glui_commandline.cpp
  13. +83 −83 glui_control.cpp
  14. +87 −87 glui_edittext.cpp
  15. +22 −22 glui_filebrowser.cpp
  16. +34 −34 glui_img_checkbox_0.c
  17. +34 −34 glui_img_checkbox_0_dis.c
  18. +34 −34 glui_img_checkbox_1.c
  19. +34 −34 glui_img_checkbox_1_dis.c
  20. +52 −52 glui_img_downarrow.c
  21. +52 −52 glui_img_leftarrow.c
  22. +38 −38 glui_img_listbox_down.c
  23. BIN glui_img_listbox_down.ppm
  24. +38 −38 glui_img_listbox_up.c
  25. BIN glui_img_listbox_up.ppm
  26. +38 −38 glui_img_listbox_up_dis.c
  27. 0 glui_img_listbox_up_dis.ppm
  28. +40 −40 glui_img_radiobutton_0.c
  29. +40 −40 glui_img_radiobutton_0_dis.c
  30. +40 −40 glui_img_radiobutton_1.c
  31. +40 −40 glui_img_radiobutton_1_dis.c
  32. +52 −52 glui_img_rightarrow.c
  33. +20 −20 glui_img_spindown_0.c
  34. +20 −20 glui_img_spindown_1.c
  35. +20 −20 glui_img_spindown_dis.c
  36. +20 −20 glui_img_spinup_0.c
  37. +20 −20 glui_img_spinup_1.c
  38. +20 −20 glui_img_spinup_dis.c
  39. +52 −52 glui_img_uparrow.c
  40. +17 −17 glui_internal.h
  41. +16 −16 glui_internal_control.h
  42. +33 −33 glui_list.cpp
  43. +32 −32 glui_listbox.cpp
  44. +25 −25 glui_mouse_iaction.cpp
  45. +16 −16 glui_node.cpp
  46. +21 −21 glui_panel.cpp
  47. +32 −32 glui_radio.cpp
  48. +27 −27 glui_rollout.cpp
  49. +36 −36 glui_rotation.cpp
  50. +54 −54 glui_scrollbar.cpp
  51. +20 −20 glui_separator.cpp
  52. +84 −84 glui_spinner.cpp
  53. +17 −17 glui_statictext.cpp
  54. +16 −16 glui_string.cpp
  55. +91 −91 glui_textbox.cpp
  56. +24 −24 glui_translation.cpp
  57. +20 −20 glui_tree.cpp
  58. +40 −40 glui_treepanel.cpp
  59. +16 −16 glui_window.cpp
  60. 0 makefile
  61. +27 −27 quaternion.cpp
  62. +19 −19 quaternion.h
  63. 0 readme.txt
  64. +76 −76 viewmodel.cpp
  65. +27 −27 viewmodel.h
View
996 algebra3.cpp 100755 → 100644

Large diffs are not rendered by default.

Oops, something went wrong.
View
52 algebra3.h 100755 → 100644
@@ -8,26 +8,26 @@
WWW: http://sourceforge.net/projects/glui/
Forums: http://sourceforge.net/forum/?group_id=92496
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/**************************************************************************
There are three vector classes and two matrix classes: vec2, vec3,
vec4, mat3, and mat4.
@@ -38,8 +38,8 @@
Additional functions include length(), normalize(), homogenize for
vectors, and print(), set(), apply() for all classes.
There is a function transpose() for matrices, but note that it
does not actually change the matrix,
There is a function transpose() for matrices, but note that it
does not actually change the matrix,
When multiplied with a matrix, a vector is treated as a row vector
if it precedes the matrix (v*M), and as a column vector if it
@@ -55,7 +55,7 @@
vec4 b( a, 4.0 ); // now b == {1.0, 2.0, 3.0, 4.0};
When casting to a lower dimension, the vector is homogenized in
the lower dimension. E.g., if a 4d {X,Y,Z,W} is cast to 3d, the
resulting vector is {X/W, Y/W, Z/W}. It is up to the user to
resulting vector is {X/W, Y/W, Z/W}. It is up to the user to
insure the fourth component is not zero before casting.
There are also the following function for building matrices:
@@ -66,14 +66,14 @@
NOTE: When compiling for Windows, include this file first, to avoid
certain name conflicts
---------------------------------------------------------------------
Author: Jean-Francois DOUEg
Revised: Paul Rademacher
Author: Jean-Francois DOUEg
Revised: Paul Rademacher
Version 3.2 - Feb 1998
Revised: Nigel Stewart (GLUI Code Cleaning)
**************************************************************************/
#ifndef GLUI_ALGEBRA3_H
@@ -289,7 +289,7 @@ class vec4
void print(FILE *file, const char *name) const; // print vector to a file
void set(float x, float y, float z, float a);
void set(float x, float y, float z, float a);
float &operator [] (int i); // indexing
const float &operator [] (int i) const; // indexing
@@ -422,7 +422,7 @@ class mat4
mat4 &apply(V_FCT_PTR fct); // apply a func. to each element
void print(FILE *file, const char *name) const; // print matrix to a file
vec4 &operator [] (int i); // indexing
const vec4 &operator [] (int i) const; // indexing
View
54 arcball.cpp 100755 → 100644
@@ -13,21 +13,21 @@
WWW: http://sourceforge.net/projects/glui/
Forums: http://sourceforge.net/forum/?group_id=92496
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
**********************************************************************/
@@ -39,7 +39,7 @@
/**************************************** Arcball::Arcball() ****/
/* Default (void) constructor for Arcball */
Arcball::Arcball()
Arcball::Arcball()
{
rot_ptr = &rot;
init();
@@ -48,7 +48,7 @@ Arcball::Arcball()
/**************************************** Arcball::Arcball() ****/
/* Takes as argument a mat4 to use instead of the internal rot */
Arcball::Arcball(mat4 *mtx)
Arcball::Arcball(mat4 *mtx)
{
rot_ptr = mtx;
}
@@ -99,17 +99,17 @@ vec3 Arcball::mouse_to_sphere(const vec2 &p)
mag = v2*v2;
if ( mag > 1.0 )
if ( mag > 1.0 )
v3.normalize();
else
else
v3[VZ] = (float) sqrt( 1.0 - mag );
/* Now we add constraints - X takes precedence over Y */
if ( constraint_x )
if ( constraint_x )
{
v3 = constrain_vector( v3, vec3( 1.0, 0.0, 0.0 ));
}
else if ( constraint_y )
}
else if ( constraint_y )
{
v3 = constrain_vector( v3, vec3( 0.0, 1.0, 0.0 ));
}
@@ -174,12 +174,12 @@ void Arcball::mouse_motion(int x, int y, int shift, int ctrl, int alt)
set_constraints(false, false);
if ( q_increment.s < .999999 )
if ( q_increment.s < .999999 )
{
is_spinning = true;
zero_increment = false;
}
else
else
{
is_spinning = false;
zero_increment = true;
@@ -207,18 +207,18 @@ void Arcball::set_constraints(bool _constraint_x, bool _constraint_y)
void Arcball::idle()
{
if (is_mouse_down)
if (is_mouse_down)
{
is_spinning = false;
zero_increment = true;
}
if (damp_factor < 1.0f)
if (damp_factor < 1.0f)
q_increment.scale_angle(1.0f - damp_factor);
rot_increment = q_increment.to_mat4();
if (q_increment.s >= .999999f)
if (q_increment.s >= .999999f)
{
is_spinning = false;
zero_increment = true;
View
44 arcball.h 100755 → 100644
@@ -2,7 +2,7 @@
arcball.h
GLUI User Interface Toolkit
GLUI User Interface Toolkit
Copyright (c) 1998 Paul Rademacher
Feb 1998, Paul Rademacher (rademach@cs.unc.edu)
Oct 2003, Nigel Stewart - GLUI Code Cleaning
@@ -11,30 +11,30 @@
WWW: http://sourceforge.net/projects/glui/
Forums: http://sourceforge.net/forum/?group_id=92496
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
---------------------------------------------------------------------
A C++ class that implements the Arcball, as described by Ken
Shoemake in Graphics Gems IV.
Shoemake in Graphics Gems IV.
This class takes as input mouse events (mouse down, mouse drag,
mouse up), and creates the appropriate quaternions and 4x4 matrices
to represent the rotation given by the mouse.
to represent the rotation given by the mouse.
This class is used as follows:
- initialize [either in the constructor or with set_params()], the
center position (x,y) of the arcball on the screen, and the radius
@@ -46,11 +46,11 @@
the rotation to certain axes (X for CONTROL, Y for ALT).
- when the mouse button is released, call mouse_up()
Axis constraints can also be explicitly set with the
Axis constraints can also be explicitly set with the
set_constraints() function.
The current rotation is stored in the 4x4 float matrix 'rot'.
It is also stored in the quaternion 'q_now'.
It is also stored in the quaternion 'q_now'.
**********************************************************************/
@@ -61,7 +61,7 @@
#include "algebra3.h"
#include "quaternion.h"
class Arcball
class Arcball
{
public:
Arcball();
@@ -75,13 +75,13 @@ class Arcball
void mouse_motion(int x, int y, int shift, int ctrl, int alt);
void mouse_motion(int x, int y);
void set_constraints(bool constrain_x, bool constrain_y);
void set_params(const vec2 &center, float radius);
void set_params(const vec2 &center, float radius);
void reset_mouse();
void init();
vec3 constrain_vector(const vec3 &vector, const vec3 &axis);
vec3 mouse_to_sphere(const vec2 &p);
//public:
int is_mouse_down; /* true for down, false for up */
int is_spinning;
Oops, something went wrong.

0 comments on commit 50d466b

Please sign in to comment.