Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
32064cb5
Commit
32064cb5
authored
Feb 16, 2009
by
David Adam
Committed by
Alexandre Julliard
Feb 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: D3DRMQuaternionSlerp should be tested against returned Windows values.
parent
c1a84840
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
16 deletions
+5
-16
vector.c
dlls/d3drm/tests/vector.c
+5
-16
No files found.
dlls/d3drm/tests/vector.c
View file @
32064cb5
...
@@ -242,7 +242,7 @@ static void MatrixTest(void)
...
@@ -242,7 +242,7 @@ static void MatrixTest(void)
static
void
QuaternionTest
(
void
)
static
void
QuaternionTest
(
void
)
{
{
D3DVECTOR
axis
;
D3DVECTOR
axis
;
D3DVALUE
g
,
h
,
epsilon
,
par
,
theta
;
D3DVALUE
par
,
theta
;
D3DRMQUATERNION
q
,
q1
,
q2
,
r
;
D3DRMQUATERNION
q
,
q1
,
q2
,
r
;
/*_________________QuaternionFromRotation___________________*/
/*_________________QuaternionFromRotation___________________*/
...
@@ -254,31 +254,20 @@ static void QuaternionTest(void)
...
@@ -254,31 +254,20 @@ static void QuaternionTest(void)
/*_________________QuaternionSlerp_________________________*/
/*_________________QuaternionSlerp_________________________*/
/* If the angle of the two quaternions is in ]PI/2;3PI/2[, QuaternionSlerp
/* If the angle of the two quaternions is in ]PI/2;3PI/2[, QuaternionSlerp
* interpolates between the first quaternion and the opposite of the second one.
The test proves
* interpolates between the first quaternion and the opposite of the second one.
* this fact. */
*
The test proves
this fact. */
par
=
0
.
31
f
;
par
=
0
.
31
f
;
q1
.
s
=
1
.
0
f
;
U1
(
q1
.
v
).
x
=
2
.
0
f
;
U2
(
q1
.
v
).
y
=
3
.
0
f
;
U3
(
q1
.
v
).
z
=
50
.
0
f
;
q1
.
s
=
1
.
0
f
;
U1
(
q1
.
v
).
x
=
2
.
0
f
;
U2
(
q1
.
v
).
y
=
3
.
0
f
;
U3
(
q1
.
v
).
z
=
50
.
0
f
;
q2
.
s
=-
4
.
0
f
;
U1
(
q2
.
v
).
x
=
6
.
0
f
;
U2
(
q2
.
v
).
y
=
7
.
0
f
;
U3
(
q2
.
v
).
z
=
8
.
0
f
;
q2
.
s
=-
4
.
0
f
;
U1
(
q2
.
v
).
x
=
6
.
0
f
;
U2
(
q2
.
v
).
y
=
7
.
0
f
;
U3
(
q2
.
v
).
z
=
8
.
0
f
;
/* The angle between q1 and q2 is in [-PI/2,PI/2]. So, one interpolates between q1 and q2. */
/* The angle between q1 and q2 is in [-PI/2,PI/2]. So, one interpolates between q1 and q2. */
epsilon
=
1
.
0
f
;
q
.
s
=
-
0
.
55
f
;
U1
(
q
.
v
).
x
=
3
.
24
f
;
U2
(
q
.
v
).
y
=
4
.
24
f
;
U3
(
q
.
v
).
z
=
36
.
98
f
;
g
=
1
.
0
f
-
par
;
h
=
epsilon
*
par
;
/* Part of the test proving that the interpolation is linear. */
q
.
s
=
g
*
q1
.
s
+
h
*
q2
.
s
;
U1
(
q
.
v
).
x
=
g
*
U1
(
q1
.
v
).
x
+
h
*
U1
(
q2
.
v
).
x
;
U2
(
q
.
v
).
y
=
g
*
U2
(
q1
.
v
).
y
+
h
*
U2
(
q2
.
v
).
y
;
U3
(
q
.
v
).
z
=
g
*
U3
(
q1
.
v
).
z
+
h
*
U3
(
q2
.
v
).
z
;
pD3DRMQuaternionSlerp
(
&
r
,
&
q1
,
&
q2
,
par
);
pD3DRMQuaternionSlerp
(
&
r
,
&
q1
,
&
q2
,
par
);
expect_quat
(
q
,
r
);
expect_quat
(
q
,
r
);
q1
.
s
=
1
.
0
f
;
U1
(
q1
.
v
).
x
=
2
.
0
f
;
U2
(
q1
.
v
).
y
=
3
.
0
f
;
U3
(
q1
.
v
).
z
=
50
.
0
f
;
q1
.
s
=
1
.
0
f
;
U1
(
q1
.
v
).
x
=
2
.
0
f
;
U2
(
q1
.
v
).
y
=
3
.
0
f
;
U3
(
q1
.
v
).
z
=
50
.
0
f
;
q2
.
s
=-
94
.
0
f
;
U1
(
q2
.
v
).
x
=
6
.
0
f
;
U2
(
q2
.
v
).
y
=
7
.
0
f
;
U3
(
q2
.
v
).
z
=-
8
.
0
f
;
q2
.
s
=-
94
.
0
f
;
U1
(
q2
.
v
).
x
=
6
.
0
f
;
U2
(
q2
.
v
).
y
=
7
.
0
f
;
U3
(
q2
.
v
).
z
=-
8
.
0
f
;
/* The angle between q1 and q2 is not in [-PI/2,PI/2]. So, one interpolates between q1 and -q2. */
/* The angle between q1 and q2 is not in [-PI/2,PI/2]. So, one interpolates between q1 and -q2. */
epsilon
=-
1
.
0
f
;
q
.
s
=
29
.
83
f
;
U1
(
q
.
v
).
x
=-
0
.
48
f
;
U2
(
q
.
v
).
y
=-
0
.
10
f
;
U3
(
q
.
v
).
z
=
36
.
98
f
;
g
=
1
.
0
f
-
par
;
h
=
epsilon
*
par
;
q
.
s
=
g
*
q1
.
s
+
h
*
q2
.
s
;
U1
(
q
.
v
).
x
=
g
*
U1
(
q1
.
v
).
x
+
h
*
U1
(
q2
.
v
).
x
;
U2
(
q
.
v
).
y
=
g
*
U2
(
q1
.
v
).
y
+
h
*
U2
(
q2
.
v
).
y
;
U3
(
q
.
v
).
z
=
g
*
U3
(
q1
.
v
).
z
+
h
*
U3
(
q2
.
v
).
z
;
pD3DRMQuaternionSlerp
(
&
r
,
&
q1
,
&
q2
,
par
);
pD3DRMQuaternionSlerp
(
&
r
,
&
q1
,
&
q2
,
par
);
expect_quat
(
q
,
r
);
expect_quat
(
q
,
r
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment