Go to the source code of this file.
|
D3DCOLOR WINAPI | D3DRMCreateColorRGB (D3DVALUE red, D3DVALUE green, D3DVALUE blue) |
|
D3DCOLOR WINAPI | D3DRMCreateColorRGBA (D3DVALUE red, D3DVALUE green, D3DVALUE blue, D3DVALUE alpha) |
|
D3DVALUE WINAPI | D3DRMColorGetAlpha (D3DCOLOR color) |
|
D3DVALUE WINAPI | D3DRMColorGetBlue (D3DCOLOR color) |
|
D3DVALUE WINAPI | D3DRMColorGetGreen (D3DCOLOR color) |
|
D3DVALUE WINAPI | D3DRMColorGetRed (D3DCOLOR color) |
|
D3DRMQUATERNION *WINAPI | D3DRMQuaternionMultiply (D3DRMQUATERNION *q, D3DRMQUATERNION *a, D3DRMQUATERNION *b) |
|
void WINAPI | D3DRMMatrixFromQuaternion (D3DRMMATRIX4D m, D3DRMQUATERNION *q) |
|
D3DRMQUATERNION *WINAPI | D3DRMQuaternionFromRotation (D3DRMQUATERNION *q, D3DVECTOR *v, D3DVALUE theta) |
|
D3DRMQUATERNION *WINAPI | D3DRMQuaternionSlerp (D3DRMQUATERNION *q, D3DRMQUATERNION *a, D3DRMQUATERNION *b, D3DVALUE alpha) |
|
D3DVECTOR *WINAPI | D3DRMVectorAdd (D3DVECTOR *d, D3DVECTOR *s1, D3DVECTOR *s2) |
|
D3DVECTOR *WINAPI | D3DRMVectorSubtract (D3DVECTOR *d, D3DVECTOR *s1, D3DVECTOR *s2) |
|
D3DVECTOR *WINAPI | D3DRMVectorCrossProduct (D3DVECTOR *d, D3DVECTOR *s1, D3DVECTOR *s2) |
|
D3DVALUE WINAPI | D3DRMVectorDotProduct (D3DVECTOR *s1, D3DVECTOR *s2) |
|
D3DVALUE WINAPI | D3DRMVectorModulus (D3DVECTOR *v) |
|
D3DVECTOR *WINAPI | D3DRMVectorNormalize (D3DVECTOR *u) |
|
D3DVECTOR *WINAPI | D3DRMVectorRandom (D3DVECTOR *d) |
|
D3DVECTOR *WINAPI | D3DRMVectorReflect (D3DVECTOR *r, D3DVECTOR *ray, D3DVECTOR *norm) |
|
D3DVECTOR *WINAPI | D3DRMVectorRotate (D3DVECTOR *r, D3DVECTOR *v, D3DVECTOR *axis, D3DVALUE theta) |
|
D3DVECTOR *WINAPI | D3DRMVectorScale (D3DVECTOR *d, D3DVECTOR *s, D3DVALUE factor) |
|
◆ D3DRMColorGetAlpha()
Definition at line 38 of file math.c.
39{
41}
#define RGBA_GETALPHA(rgb)
Referenced by ColorTest().
◆ D3DRMColorGetBlue()
Definition at line 44 of file math.c.
45{
47}
#define RGBA_GETBLUE(rgb)
Referenced by ColorTest().
◆ D3DRMColorGetGreen()
Definition at line 50 of file math.c.
51{
53}
#define RGBA_GETGREEN(rgb)
Referenced by ColorTest().
◆ D3DRMColorGetRed()
◆ D3DRMCreateColorRGB()
Definition at line 23 of file math.c.
24{
26}
D3DCOLOR WINAPI D3DRMCreateColorRGBA(D3DVALUE red, D3DVALUE green, D3DVALUE blue, D3DVALUE alpha)
Referenced by ColorTest().
◆ D3DRMCreateColorRGBA()
Definition at line 28 of file math.c.
29{
31
33
35}
static void d3drm_set_color(D3DCOLOR *color, float r, float g, float b, float a)
GLclampf GLclampf GLclampf alpha
Referenced by ColorTest(), and D3DRMCreateColorRGB().
◆ D3DRMMatrixFromQuaternion()
Definition at line 78 of file math.c.
79{
85 m[0][0] = 1.0-2.0*(
y*
y+
z*
z);
86 m[1][1] = 1.0-2.0*(
x*
x+
z*
z);
87 m[2][2] = 1.0-2.0*(
x*
x+
y*
y);
88 m[1][0] = 2.0*(
x*
y+
z*
w);
89 m[0][1] = 2.0*(
x*
y-
z*
w);
90 m[2][0] = 2.0*(
x*
z-
y*
w);
91 m[0][2] = 2.0*(
x*
z+
y*
w);
92 m[2][1] = 2.0*(
y*
z+
x*
w);
93 m[1][2] = 2.0*(
y*
z-
x*
w);
101}
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble GLdouble q
GLubyte GLubyte GLubyte GLubyte w
Referenced by MatrixTest().
◆ D3DRMQuaternionFromRotation()
Definition at line 104 of file math.c.
105{
106 q->s =
cos(theta/2.0);
109}
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
D3DVECTOR *WINAPI D3DRMVectorScale(D3DVECTOR *d, D3DVECTOR *s, D3DVALUE factor)
D3DVECTOR *WINAPI D3DRMVectorNormalize(D3DVECTOR *u)
Referenced by QuaternionTest(), and test_animation().
◆ D3DRMQuaternionMultiply()
Definition at line 62 of file math.c.
63{
66
69 temp.v.u1.x =
a->s *
b->v.u1.x +
b->s *
a->v.u1.x + cross_product.u1.
x;
70 temp.v.u2.y =
a->s *
b->v.u2.y +
b->s *
a->v.u2.y + cross_product.u2.
y;
71 temp.v.u3.z =
a->s *
b->v.u3.z +
b->s *
a->v.u3.z + cross_product.u3.
z;
72
75}
D3DVECTOR *WINAPI D3DRMVectorCrossProduct(D3DVECTOR *d, D3DVECTOR *s1, D3DVECTOR *s2)
D3DVALUE WINAPI D3DRMVectorDotProduct(D3DVECTOR *s1, D3DVECTOR *s2)
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
Referenced by D3DRMVectorRotate().
◆ D3DRMQuaternionSlerp()
Definition at line 112 of file math.c.
114{
117
119 epsilon = 1.0f;
122 if (dot < 0.0)
123 {
124 epsilon = -1.0;
125 dot = -dot;
126 }
127 if( 1.0f - dot > 0.001f )
128 {
132 }
133 q->s =
temp *
a->s + epsilon *
u *
b->s;
138}
valarray< _Tp > acos(const valarray< _Tp > &__x)
D3DVECTOR *WINAPI D3DRMVectorAdd(D3DVECTOR *d, D3DVECTOR *s1, D3DVECTOR *s2)
GLfloat GLfloat GLfloat v2
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Referenced by QuaternionTest().
◆ D3DRMVectorAdd()
◆ D3DRMVectorCrossProduct()
◆ D3DRMVectorDotProduct()
◆ D3DRMVectorModulus()
◆ D3DRMVectorNormalize()
◆ D3DRMVectorRandom()
Definition at line 213 of file math.c.
214{
220}
_Check_return_ int __cdecl rand(void)
◆ D3DRMVectorReflect()
Definition at line 223 of file math.c.
224{
227
230}
_Tp _STLP_CALL norm(const complex< _Tp > &__z)
D3DVECTOR *WINAPI D3DRMVectorSubtract(D3DVECTOR *d, D3DVECTOR *s1, D3DVECTOR *s2)
GLdouble GLdouble GLdouble r
Referenced by VectorTest().
◆ D3DRMVectorRotate()
Definition at line 233 of file math.c.
234{
237
238 quaternion1.
s =
cos(theta * 0.5f);
239 quaternion2.
s =
cos(theta * 0.5f);
247
250}
D3DRMQUATERNION *WINAPI D3DRMQuaternionMultiply(D3DRMQUATERNION *q, D3DRMQUATERNION *a, D3DRMQUATERNION *b)
Referenced by VectorTest().
◆ D3DRMVectorScale()
Definition at line 253 of file math.c.
254{
256
260
263}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint factor
Referenced by D3DRMQuaternionFromRotation(), D3DRMQuaternionSlerp(), D3DRMVectorNormalize(), D3DRMVectorReflect(), D3DRMVectorRotate(), and VectorTest().
◆ D3DRMVectorSubtract()