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
45b13a6c
Commit
45b13a6c
authored
Nov 19, 2007
by
David Adam
Committed by
Alexandre Julliard
Nov 20, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx8: Implement D3DXQuaternionMultiply.
parent
375dcaa8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
1 deletion
+16
-1
d3dx8.spec
dlls/d3dx8/d3dx8.spec
+1
-1
math.c
dlls/d3dx8/math.c
+9
-0
math.c
dlls/d3dx8/tests/math.c
+5
-0
d3dx8math.h
include/d3dx8math.h
+1
-0
No files found.
dlls/d3dx8/d3dx8.spec
View file @
45b13a6c
...
...
@@ -53,7 +53,7 @@
@ stub D3DXQuaternionRotationMatrix
@ stub D3DXQuaternionRotationAxis
@ stub D3DXQuaternionRotationYawPitchRoll
@ st
ub D3DXQuaternionMultiply
@ st
dcall D3DXQuaternionMultiply(ptr ptr ptr)
@ stdcall D3DXQuaternionNormalize(ptr ptr)
@ stub D3DXQuaternionInverse
@ stub D3DXQuaternionLn
...
...
dlls/d3dx8/math.c
View file @
45b13a6c
...
...
@@ -581,6 +581,15 @@ D3DXPLANE* WINAPI D3DXPlaneTransform(D3DXPLANE *pout, CONST D3DXPLANE *pplane, C
/*_________________D3DXQUATERNION________________*/
D3DXQUATERNION
*
WINAPI
D3DXQuaternionMultiply
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq1
,
CONST
D3DXQUATERNION
*
pq2
)
{
pout
->
x
=
pq2
->
w
*
pq1
->
x
+
pq2
->
x
*
pq1
->
w
+
pq2
->
y
*
pq1
->
z
-
pq2
->
z
*
pq1
->
y
;
pout
->
y
=
pq2
->
w
*
pq1
->
y
-
pq2
->
x
*
pq1
->
z
+
pq2
->
y
*
pq1
->
w
+
pq2
->
z
*
pq1
->
x
;
pout
->
z
=
pq2
->
w
*
pq1
->
z
+
pq2
->
x
*
pq1
->
y
-
pq2
->
y
*
pq1
->
x
+
pq2
->
z
*
pq1
->
w
;
pout
->
w
=
pq2
->
w
*
pq1
->
w
-
pq2
->
x
*
pq1
->
x
-
pq2
->
y
*
pq1
->
y
-
pq2
->
z
*
pq1
->
z
;
return
pout
;
}
D3DXQUATERNION
*
WINAPI
D3DXQuaternionNormalize
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq
)
{
FLOAT
norm
;
...
...
dlls/d3dx8/tests/math.c
View file @
45b13a6c
...
...
@@ -622,6 +622,11 @@ static void D3X8QuaternionTest(void)
got
=
D3DXQuaternionLengthSq
(
NULL
);
ok
(
fabs
(
got
-
expected
)
<
admitted_error
,
"Expected: %f, Got: %f
\n
"
,
expected
,
got
);
/*_______________D3DXQuaternionMultiply________________________*/
expectedquat
.
x
=
3
.
0
f
;
expectedquat
.
y
=
61
.
0
f
;
expectedquat
.
z
=
-
32
.
0
f
;
expectedquat
.
w
=
85
.
0
f
;
D3DXQuaternionMultiply
(
&
gotquat
,
&
q
,
&
r
);
expect_vec4
(
expectedquat
,
gotquat
);
/*_______________D3DXQuaternionNormalize________________________*/
expectedquat
.
x
=
1
.
0
f
/
11
.
0
f
;
expectedquat
.
y
=
2
.
0
f
/
11
.
0
f
;
expectedquat
.
z
=
4
.
0
f
/
11
.
0
f
;
expectedquat
.
w
=
10
.
0
f
/
11
.
0
f
;
D3DXQuaternionNormalize
(
&
gotquat
,
&
q
);
...
...
include/d3dx8math.h
View file @
45b13a6c
...
...
@@ -302,6 +302,7 @@ D3DXVECTOR3* WINAPI D3DXPlaneIntersectLine(D3DXVECTOR3 *pout, CONST D3DXPLANE *p
D3DXPLANE
*
WINAPI
D3DXPlaneNormalize
(
D3DXPLANE
*
pout
,
CONST
D3DXPLANE
*
pp
);
D3DXPLANE
*
WINAPI
D3DXPlaneTransform
(
D3DXPLANE
*
pout
,
CONST
D3DXPLANE
*
pplane
,
CONST
D3DXMATRIX
*
pm
);
D3DXQUATERNION
*
WINAPI
D3DXQuaternionMultiply
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq1
,
CONST
D3DXQUATERNION
*
pq2
);
D3DXQUATERNION
*
WINAPI
D3DXQuaternionNormalize
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq
);
D3DXVECTOR2
*
WINAPI
D3DXVec2BaryCentric
(
D3DXVECTOR2
*
pout
,
CONST
D3DXVECTOR2
*
pv1
,
CONST
D3DXVECTOR2
*
pv2
,
CONST
D3DXVECTOR2
*
pv3
,
FLOAT
f
,
FLOAT
g
);
...
...
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