-
Notifications
You must be signed in to change notification settings - Fork 11
/
max2sphere.h
executable file
·60 lines (50 loc) · 1.07 KB
/
max2sphere.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
49
50
51
52
53
54
55
56
57
58
59
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <sys/time.h>
#include "bitmaplib.h"
#define LEFT 0
#define RIGHT 1
#define TOP 2
#define FRONT 3
#define BACK 4
#define DOWN 5
#define NEARLYONE 0.9999
typedef struct {
double x,y,z;
} XYZ;
typedef struct {
float u,v;
} UV;
typedef struct {
double a,b,c,d;
} PLANE;
typedef struct {
int outwidth,outheight;
int framewidth,frameheight;
int antialias,antialias2;
int nstart,nstop;
PLANE faces[6];
char outfilename[256];
int debug;
} PARAMS;
typedef struct {
int width,height;
int sidewidth;
int centerwidth;
int blendwidth;
int equiwidth;
} FRAMESPECS;
// Prototypes
int CheckFrames(char *,char *,int *,int *);
int WriteSpherical(char *,int,BITMAP4 *,int,int);
int ReadFrame(BITMAP4 *,char *,int,int);
int FindFaceUV(double,double,UV *);
BITMAP4 GetColour(int,UV,BITMAP4 *,BITMAP4 *);
int CheckTemplate(char *,int);
BITMAP4 ColourBlend(BITMAP4,BITMAP4,double);
void RotateUV90(UV *);
void Init(void);
double GetRunTime(void);
void GiveUsage(char *);