2008-03-25 10:02:13 +00:00
|
|
|
|
|
|
|
#ifndef __SOLVESPACE_H
|
|
|
|
#define __SOLVESPACE_H
|
|
|
|
|
2008-03-28 10:00:37 +00:00
|
|
|
// Debugging functions
|
|
|
|
#define oops() do { dbp("oops at line %d, file %s", __LINE__, __FILE__); \
|
|
|
|
exit(-1); } while(0)
|
|
|
|
#ifndef min
|
|
|
|
#define min(x, y) ((x) < (y) ? (x) : (y))
|
|
|
|
#endif
|
|
|
|
#ifndef max
|
|
|
|
#define max(x, y) ((x) > (y) ? (x) : (y))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void dbp(char *str, ...);
|
2008-04-12 15:17:58 +00:00
|
|
|
void Error(char *str, ...);
|
2008-03-25 10:02:13 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2008-03-26 09:18:12 +00:00
|
|
|
#include <stdio.h>
|
2008-03-27 09:53:51 +00:00
|
|
|
#include <math.h>
|
2008-04-01 10:48:44 +00:00
|
|
|
#include <windows.h> // required for GL stuff
|
|
|
|
#include <gl/gl.h>
|
|
|
|
#include <gl/glu.h>
|
|
|
|
|
2008-04-09 08:39:01 +00:00
|
|
|
class Expr;
|
2008-03-25 10:02:13 +00:00
|
|
|
#include "dsc.h"
|
2008-03-26 09:18:12 +00:00
|
|
|
#include "sketch.h"
|
2008-04-12 14:12:26 +00:00
|
|
|
#include "ui.h"
|
2008-04-08 12:54:53 +00:00
|
|
|
#include "expr.h"
|
2008-03-25 10:02:13 +00:00
|
|
|
|
2008-04-11 11:13:47 +00:00
|
|
|
// From the platform-specific code.
|
2008-04-11 12:47:14 +00:00
|
|
|
void InvalidateGraphics(void);
|
|
|
|
void InvalidateText(void);
|
2008-03-27 09:53:51 +00:00
|
|
|
|
2008-04-11 11:13:47 +00:00
|
|
|
// Utility functions that are provided in the platform-independent code.
|
|
|
|
void glxVertex3v(Vector u);
|
|
|
|
void glxWriteText(char *str);
|
|
|
|
void glxTranslatev(Vector u);
|
|
|
|
void glxOntoCsys(Vector u, Vector v);
|
2008-03-27 09:53:51 +00:00
|
|
|
|
2008-03-25 10:02:13 +00:00
|
|
|
|
2008-03-26 09:18:12 +00:00
|
|
|
#define arraylen(x) (sizeof((x))/sizeof((x)[0]))
|
2008-03-27 09:53:51 +00:00
|
|
|
#define PI (3.1415926535897931)
|
|
|
|
void MakeMatrix(double *mat, double a11, double a12, double a13, double a14,
|
|
|
|
double a21, double a22, double a23, double a24,
|
|
|
|
double a31, double a32, double a33, double a34,
|
|
|
|
double a41, double a42, double a43, double a44);
|
|
|
|
|
2008-03-26 09:18:12 +00:00
|
|
|
|
2008-03-28 10:00:37 +00:00
|
|
|
class SolveSpace {
|
|
|
|
public:
|
2008-03-26 09:18:12 +00:00
|
|
|
TextWindow TW;
|
|
|
|
GraphicsWindow GW;
|
|
|
|
|
2008-04-08 12:54:53 +00:00
|
|
|
IdList<Group,hGroup> group;
|
|
|
|
IdList<Request,hRequest> request;
|
2008-03-26 09:18:12 +00:00
|
|
|
IdList<Entity,hEntity> entity;
|
|
|
|
IdList<Point,hPoint> point;
|
|
|
|
IdList<Param,hParam> param;
|
2008-03-25 10:02:13 +00:00
|
|
|
|
2008-04-08 12:54:53 +00:00
|
|
|
hGroup activeGroup;
|
|
|
|
|
2008-04-12 16:28:48 +00:00
|
|
|
void GenerateForUserInterface(void);
|
|
|
|
void ForceReferences(void);
|
|
|
|
|
2008-03-25 10:02:13 +00:00
|
|
|
void Init(void);
|
2008-04-08 12:54:53 +00:00
|
|
|
void Solve(void);
|
2008-03-28 10:00:37 +00:00
|
|
|
};
|
2008-03-25 10:02:13 +00:00
|
|
|
|
|
|
|
extern SolveSpace SS;
|
|
|
|
|
|
|
|
#endif
|