VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/include/cr_matrix.h@ 15532

最後變更 在這個檔案從15532是 15532,由 vboxsync 提交於 16 年 前

crOpenGL: export to OSE

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 2.1 KB
 
1
2#ifndef CR_MATRIX_H
3#define CR_MATRIX_H
4
5#include "chromium.h"
6
7#include <iprt/cdefs.h>
8
9/*
10 * Note: m[col][row] matches OpenGL's column-major memory layout
11 */
12typedef struct {
13 float m00, m01, m02, m03;
14 float m10, m11, m12, m13;
15 float m20, m21, m22, m23;
16 float m30, m31, m32, m33;
17} CRmatrix;
18
19typedef struct { GLfloat x,y,z,w; } GLvectorf;
20typedef struct { GLdouble x,y,z,w; } GLvectord;
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26extern DECLEXPORT(void)
27crMatrixInit(CRmatrix *m);
28
29extern DECLEXPORT(void)
30crMatrixInitFromString(CRmatrix *m, const char *s);
31
32extern DECLEXPORT(void)
33crMatrixInitFromFloats(CRmatrix *m, const float *v);
34
35extern DECLEXPORT(void)
36crMatrixInitFromDoubles(CRmatrix *m, const double *v);
37
38extern DECLEXPORT(void)
39crMatrixPrint(const char *msg, const CRmatrix *m);
40
41extern DECLEXPORT(void)
42crMatrixGetFloats(float *values, const CRmatrix *m);
43
44extern DECLEXPORT(int)
45crMatrixIsEqual(const CRmatrix *m, const CRmatrix *n);
46
47extern DECLEXPORT(int)
48crMatrixIsIdentity(const CRmatrix *m);
49
50extern DECLEXPORT(int)
51crMatrixIsOrthographic(const CRmatrix *m);
52
53extern DECLEXPORT(void)
54crMatrixCopy(CRmatrix *dest, const CRmatrix *src);
55
56extern DECLEXPORT(void)
57crMatrixMultiply(CRmatrix *p, const CRmatrix *a, const CRmatrix *b);
58
59extern DECLEXPORT(void)
60crMatrixTransformPointf(const CRmatrix *m, GLvectorf *p);
61
62extern DECLEXPORT(void)
63crMatrixTransformPointd(const CRmatrix *m, GLvectord *p);
64
65extern DECLEXPORT(void)
66crMatrixInvertTranspose(CRmatrix *inv, const CRmatrix *mat);
67
68extern DECLEXPORT(void)
69crMatrixTranspose(CRmatrix *t, const CRmatrix *m);
70
71extern DECLEXPORT(void)
72crMatrixTranslate(CRmatrix *m, float x, float y, float z);
73
74extern DECLEXPORT(void)
75crMatrixRotate(CRmatrix *m, float angle, float x, float y, float z);
76
77extern DECLEXPORT(void)
78crMatrixScale(CRmatrix *m, float x, float y, float z);
79
80extern DECLEXPORT(void)
81crMatrixFrustum(CRmatrix *m,
82 float left, float right,
83 float bottom, float top,
84 float zNear, float zFar);
85
86extern DECLEXPORT(void)
87crMatrixOrtho(CRmatrix *m,
88 float left, float right,
89 float bottom, float top,
90 float znear, float zfar);
91
92#ifdef __cplusplus
93}
94#endif
95
96#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette