-
Notifications
You must be signed in to change notification settings - Fork 2
/
wrl.h
55 lines (46 loc) · 1.09 KB
/
wrl.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
#ifndef WRL_H
#define WRL_H
#include "Vector.h"
#include "Neuron.h"
class Point;
class Triangle;
#define WRL_MAX_POINT 20000
#define WRL_MAX_TRIANGLE 40000
class Wrl{
double point[WRL_MAX_POINT][3];
//0,1,2: give 3 vertices, 4 is the opposite vertices
int triangle[WRL_MAX_TRIANGLE][4];
Vector* vec[WRL_MAX_TRIANGLE];
void add(int tria,Neuron * n,int number,int step,double alpha,double beta,double gamma);
Neuron * getNeuron();
int getNrNeuron();
int random();
double random01();
int maxPoint,maxTriangle;
public:
Point* p;
Triangle* t;
Wrl(char* file);
void printWRL();
void printIV();
void printDXF();
}
;
class Vec{
double ox,oy,oz,xx,yy,zz;
public:
Vec(double x,double y,double z){ox=0;oy=0;oz=0;xx=x;yy=y;zz=z;};
Vec(double x,double y,double z,double x1,double y1,double z1){
ox=x;oy=y;oz=z;xx=x1;yy=y1;zz=z1;
};
double getOX(){return ox;}
double getOY(){return oy;}
double getOZ(){return oz;}
double getX(){return xx;}
double getY(){return yy;}
double getZ(){return zz;}
Vec* crossProduct(Vec * b){
}
}
;
#endif