-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHyper.h
48 lines (38 loc) · 896 Bytes
/
Hyper.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Greg Kaiser
//
// CS290 with Prof. Francis
// 4D Tetris
//
// Hyper.h
// Last modified: April 17, 1996
//
// (C) 1996 Board of Trustees University of Illinois
#ifndef _HYPER_H_
#define _HYPER_H_
#include <glut.h>
#include "FourD.h"
#include "Asserts.h"
#include "Board.h"
class Hyper
{
public:
Hyper();
Hyper(float low, float high, int *newpos);
Hyper(float *low, float *high, int *newpos);
~Hyper();
void Translate(int dir, int sign);
int *GetPos();
void Output();
void SetColor(int newcolor);
void DimColor();
void Drawit(int axes);
void Drawit2D(int axes);
void Plot(int index, int axes);
void Rotate(int *newpos, FourD *center, int dir, int dude, int sign);
private:
FourD **pts; // the 16 points that make up the hypercube
int *boardpos; // the position of the cube in term of
// the board's "coordinates"
int color;
};
#endif