-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproj.h
More file actions
43 lines (37 loc) · 1.02 KB
/
proj.h
File metadata and controls
43 lines (37 loc) · 1.02 KB
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
#ifndef PROJ_HEADER
#define PROJ_HEADER
#include <climits>
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include <vector>
#include <cmath>
#include <iostream>
#include <chrono>
#include <thread>
#endif
// constants
const int GS_RED = 1, GS_BLUE = 2, GS_GREEN = 3, GS_WHITE = 4;
const unsigned short GS_SOLID = USHRT_MAX, GS_DASHED = 0b0000000011111111, GS_3Q = 0b0000111111111111, GS_FUNKY = 0b0001100011111111;
// struct definitions
typedef struct {
float x1, y1, x2, y2;
} line;
typedef struct {
int x;
int y;
} point;
// GS line functions
void drawGSPoint(point, float, int);
int negate(int,int);
point swap(int,int,int,int);
point transformPoint(int,int,double,int,int,int,int);
point transform_p1(int,int,int,int,double);
int checkStipple(unsigned short &);
void GSLine(int,int,int,int,int,unsigned short,unsigned int); // main interface
// circle and ellipse drawing functions
void plot_circle_points(int,int,int,int);
void midpoint_circle(int,int,int);
void midpoint_ellipse(int,int,int,int);