]> git.mxchange.org Git - simgear.git/blob - simgear/scene/sky/clouds3d/mat16fv.hpp
Clouds3D crashes because there is no Light
[simgear.git] / simgear / scene / sky / clouds3d / mat16fv.hpp
1 //------------------------------------------------------------------------------
2 // File : mat16fv.hpp
3 //------------------------------------------------------------------------------
4 // GLVU : Copyright 1997 - 2002 
5 //        The University of North Carolina at Chapel Hill
6 //------------------------------------------------------------------------------
7 // Permission to use, copy, modify, distribute and sell this software and its 
8 // documentation for any purpose is hereby granted without fee, provided that 
9 // the above copyright notice appear in all copies and that both that copyright 
10 // notice and this permission notice appear in supporting documentation. 
11 // Binaries may be compiled with this software without any royalties or 
12 // restrictions. 
13 //
14 // The University of North Carolina at Chapel Hill makes no representations 
15 // about the suitability of this software for any purpose. It is provided 
16 // "as is" without express or implied warranty.
17
18 //============================================================================
19 // mat16fv.hpp : opengl-style float[16] matrix routines.
20 //----------------------------------------------------------------------------
21 // $Id$
22 //============================================================================
23
24 float* Copy16fv(float* A, const float* B); // A=B
25
26 float* Mult16fv(float* C, const float* A, const float* B); // C=A*B
27
28 float* Mult16fv3fv(
29   float *NewV, const float* M, const float *V); // NewV = M * [Vx,Vy,Vz,0]
30
31 float* Mult16fv3fvPerspDiv(
32   float *NewV, const float* M, const float *V); // NewV = M * [Vx,Vy,Vz,1]
33
34 float* Mult16fv4fv(
35   float *NewV, const float* M, const float *V); // NewV = M * [Vx,Vy,Vz,Vw]
36
37 float* Identity16fv(float* M);
38 float* Transpose16fv(float* M);
39
40 float* Rotate16fv(float *M, float DegAng, const float Axis[3]);
41 float* invRotate16fv(float *M, float DegAng, const float Axis[3]);
42
43 float* Scale16fv(float* M, float sx, float sy, float sz);
44 float* invScale16fv(float* M, float sx, float sy, float sz);
45
46 float* Translate16fv(float* M, float tx, float ty, float tz);
47 float* invTranslate16fv(float* M, float tx, float ty, float tz);
48
49 float* LookAt(
50   float* M, 
51   const float Eye[3], 
52   const float LookAtPt[3], 
53   const float ViewUp[3]);
54
55 float* invLookAt(
56   float* M, 
57   const float Eye[3],
58   const float LookAtPt[3],
59   const float ViewUp[3]);
60
61 float* Frustum16fv(
62   float* M, float l, float r, float b, float t, float n, float f);
63
64 float* invFrustum16fv(
65   float* M, float l, float r, float b, float t, float n, float f);
66
67 float* Perspective(
68   float* M, float Yfov, float Aspect, float Ndist, float Fdist);
69
70 float* invPerspective(
71   float* M, float Yfov, float Aspect, float Ndist, float Fdist);
72
73 float* Viewing16fv(
74   float* M, 
75   const float X[3], const float Y[3], const float Z[3], 
76   const float O[3]);
77
78 float* invViewing16fv(
79   float* M, 
80   const float X[3], const float Y[3], const float Z[3], 
81   const float O[3]);
82
83 void Viewing2CoordFrame16fv(
84   const float *M, float X[3], float Y[3], float Z[3], float O[3]);
85
86
87 float* Viewport16fv(float* M, int WW, int WH);
88
89 float* invViewport16fv(float* M, int WW, int WH);
90
91 float* PlanarReflection16fv(float M[16], const float P[4]);
92
93 float XformCoordFrame16fv(
94   const float *M, float X[3], float Y[3], float Z[3], float O[3]);
95
96 float* Obj2WorldXform16fv(
97   float *M, float X[3], float Y[3], float Z[3], float O[3], float Scale);
98
99 float* World2ObjXform16fv(
100   float *M, 
101   const float X[3], 
102   const float Y[3], 
103   const float Z[3], 
104   const float O[3], 
105   float Scale);
106
107 float* Screen2WorldXform16fv(
108   float* M, 
109   const float X[3], const float Y[3], const float Z[3], const float O[3],
110   float l, float r, float b, float t, float n, float f,
111   int WW, int WH);
112
113 float* World2ScreenXform16fv(
114   float* M,
115   const float X[3], const float Y[3], const float Z[3], const float O[3],
116   float l, float r, float b, float t, float n, float f,
117   int WW, int WH);
118
119 void Print16fv(const float* M);