1 /* -*- c++ -*-
2 FILE: Math4d.h
3 RCS REVISION: $Revision: 1.11 $
4 
5 COPYRIGHT: (c) 1999 -- 2003 Melinda Green, Don Hatch, and Jay Berkenbilt - Superliminal Software
6 
7 LICENSE: Free to use and modify for non-commercial purposes as long as the
8     following conditions are adhered to:
9     1) Obvious credit for the source of this code and the designs it embodies
10        are clearly made, and
11     2) Ports and derived versions of 4D Magic Cube programs are not distributed
12        without the express written permission of the authors.
13 
14 DESCRIPTION:
15     This class includes a collection of static functions used to
16     perform the 4D math involved in manipulating the puzzle.
17 */
18 
19 #ifndef MATH4D_H
20 #define MATH4D_H
21 
22 #include "MagicCube.h"
23 
24 class Math4d
25 {
26 public:
27     static void get4dRotMatrix(real center[4], real axispoint[4], real angle,
28                                real mat[4][4]);
29 
30 
31     static void get4dTwistMat(int coords[4], real total_angle,
32                               int imat[4][4]);
33 
34     static void getCanonicalMatThatTakesAxisToMinusW(
35         int ax, int sgn, int mat[4][4]);
36 
37 
38     // Return 1 on success, 0 on failure.
39     static int get4dMatThatRotatesThese3ToThose3(
40         int these0[4], int these1[4], int these2[4],
41         int those0[4], int those1[4], int those2[4],
42         int mat[4][4]); /* OUTPUT */
43 
44 private:
45     static void get3dRotMatrixAboutAxis(real axis[3], real angle,
46                                         real mat[3][3]);
47 };
48 
49 #endif
50 
51 // Local Variables:
52 // c-basic-offset: 4
53 // c-comment-only-line-offset: 0
54 // c-file-offsets: ((defun-block-intro . +) (block-open . 0) (substatement-open . 0) (statement-cont . +) (statement-case-open . +4) (arglist-intro . +) (arglist-close . +) (inline-open . 0))
55 // indent-tabs-mode: nil
56 // End:
57