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
78224944
Commit
78224944
authored
Jan 10, 2010
by
David Adam
Committed by
Alexandre Julliard
Jan 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: The input quaternions are not changed when calling D3DRMQuaternionSlerp.
parent
b45d4aa1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
math.c
dlls/d3drm/math.c
+4
-2
vector.c
dlls/d3drm/tests/vector.c
+8
-1
No files found.
dlls/d3drm/math.c
View file @
78224944
...
...
@@ -128,6 +128,7 @@ LPD3DRMQUATERNION WINAPI D3DRMQuaternionFromRotation(LPD3DRMQUATERNION q, LPD3DV
LPD3DRMQUATERNION
WINAPI
D3DRMQuaternionSlerp
(
LPD3DRMQUATERNION
q
,
LPD3DRMQUATERNION
a
,
LPD3DRMQUATERNION
b
,
D3DVALUE
alpha
)
{
D3DVALUE
dot
,
epsilon
,
temp
,
theta
,
u
;
D3DVECTOR
v1
,
v2
;
dot
=
a
->
s
*
b
->
s
+
D3DRMVectorDotProduct
(
&
a
->
v
,
&
b
->
v
);
epsilon
=
1
.
0
f
;
...
...
@@ -145,8 +146,9 @@ LPD3DRMQUATERNION WINAPI D3DRMQuaternionSlerp(LPD3DRMQUATERNION q, LPD3DRMQUATER
u
=
sin
(
theta
*
alpha
)
/
sin
(
theta
);
}
q
->
s
=
temp
*
a
->
s
+
epsilon
*
u
*
b
->
s
;
D3DRMVectorAdd
(
&
q
->
v
,
D3DRMVectorScale
(
&
a
->
v
,
&
a
->
v
,
temp
),
D3DRMVectorScale
(
&
b
->
v
,
&
b
->
v
,
epsilon
*
u
));
D3DRMVectorScale
(
&
v1
,
&
a
->
v
,
temp
);
D3DRMVectorScale
(
&
v2
,
&
b
->
v
,
epsilon
*
u
);
D3DRMVectorAdd
(
&
q
->
v
,
&
v1
,
&
v2
);
return
q
;
}
...
...
dlls/d3drm/tests/vector.c
View file @
78224944
...
...
@@ -243,7 +243,7 @@ static void QuaternionTest(void)
{
D3DVECTOR
axis
;
D3DVALUE
par
,
theta
;
D3DRMQUATERNION
q
,
q1
,
q
2
,
r
;
D3DRMQUATERNION
q
,
q1
,
q
1final
,
q2
,
q2final
,
r
;
/*_________________QuaternionFromRotation___________________*/
U1
(
axis
).
x
=
1
.
0
f
;
U2
(
axis
).
y
=
1
.
0
f
;
U3
(
axis
).
z
=
1
.
0
f
;
...
...
@@ -275,8 +275,15 @@ static void QuaternionTest(void)
q1
.
s
=
0
.
1
f
;
U1
(
q1
.
v
).
x
=
0
.
2
f
;
U2
(
q1
.
v
).
y
=
0
.
3
f
;
U3
(
q1
.
v
).
z
=
0
.
4
f
;
q2
.
s
=
0
.
5
f
;
U1
(
q2
.
v
).
x
=
0
.
6
f
;
U2
(
q2
.
v
).
y
=
0
.
7
f
;
U3
(
q2
.
v
).
z
=
0
.
8
f
;
q
.
s
=
0
.
243943
f
;
U1
(
q
.
v
).
x
=
0
.
351172
f
;
U2
(
q
.
v
).
y
=
0
.
458401
f
;
U3
(
q
.
v
).
z
=
0
.
565629
f
;
q1final
=
q1
;
q2final
=
q2
;
pD3DRMQuaternionSlerp
(
&
r
,
&
q1
,
&
q2
,
par
);
expect_quat
(
q
,
r
);
/* Test to show that the input quaternions are not changed */
expect_quat
(
q1
,
q1final
);
expect_quat
(
q2
,
q2final
);
}
static
void
ColorTest
(
void
)
...
...
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