Panda3D
zmath.h
1 #ifndef __ZMATH__
2 #define __ZMATH__
3 
4 /* Matrix & Vertex */
5 
6 typedef struct {
7  PN_stdfloat m[4][4];
8 } M4;
9 
10 typedef struct {
11  PN_stdfloat m[3][3];
12 } M3;
13 
14 typedef struct {
15  PN_stdfloat m[3][4];
16 } M34;
17 
18 typedef struct {
19  PN_stdfloat v[2];
20 } V2;
21 
22 typedef struct {
23  PN_stdfloat v[3];
24 } V3;
25 
26 typedef struct {
27  PN_stdfloat v[4];
28 } V4;
29 
30 void gl_M4_Id(M4 *a);
31 int gl_M4_IsId(M4 *a);
32 void gl_M4_Move(M4 *a,M4 *b);
33 void gl_MoveV3(V3 *a,V3 *b);
34 void gl_MulM4V3(V3 *a,M4 *b,V3 *c);
35 void gl_MulM3V3(V3 *a,M4 *b,V3 *c);
36 
37 void gl_M4_MulV4(V4 * a,M4 *b,V4 * c);
38 void gl_M4_InvOrtho(M4 *a,M4 b);
39 void gl_M4_Inv(M4 *a,M4 *b);
40 void gl_M4_Mul(M4 *c,M4 *a,M4 *b);
41 void gl_M4_MulLeft(M4 *c,M4 *a);
42 void gl_M4_Transpose(M4 *a,M4 *b);
43 void gl_M4_Rotate(M4 *c,PN_stdfloat t,int u);
44 int gl_V3_Norm(V3 *a);
45 
46 V3 gl_V3_New(PN_stdfloat x,PN_stdfloat y,PN_stdfloat z);
47 V4 gl_V4_New(PN_stdfloat x,PN_stdfloat y,PN_stdfloat z,PN_stdfloat w);
48 
49 int gl_Matrix_Inv(PN_stdfloat *r,PN_stdfloat *m,int n);
50 
51 #endif
Definition: zmath.h:22
Definition: zmath.h:18
Definition: zmath.h:6
Definition: zmath.h:26
Definition: zmath.h:14
Definition: zmath.h:10