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
e8edc51d
Commit
e8edc51d
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 D3DXQuaternionBaryCentric.
parent
8ec01f62
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
2 deletions
+16
-2
d3dx8.spec
dlls/d3dx8/d3dx8.spec
+1
-1
math.c
dlls/d3dx8/math.c
+7
-0
math.c
dlls/d3dx8/tests/math.c
+7
-1
d3dx8math.h
include/d3dx8math.h
+1
-0
No files found.
dlls/d3dx8/d3dx8.spec
View file @
e8edc51d
...
...
@@ -60,7 +60,7 @@
@ stub D3DXQuaternionExp
@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long)
@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long)
@ st
ub D3DXQuaternionBaryCentric
@ st
dcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long)
@ stdcall D3DXPlaneNormalize(ptr ptr)
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
...
...
dlls/d3dx8/math.c
View file @
e8edc51d
...
...
@@ -581,6 +581,13 @@ D3DXPLANE* WINAPI D3DXPlaneTransform(D3DXPLANE *pout, CONST D3DXPLANE *pplane, C
/*_________________D3DXQUATERNION________________*/
D3DXQUATERNION
*
WINAPI
D3DXQuaternionBaryCentric
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq1
,
CONST
D3DXQUATERNION
*
pq2
,
CONST
D3DXQUATERNION
*
pq3
,
FLOAT
f
,
FLOAT
g
)
{
D3DXQUATERNION
temp1
,
temp2
;
D3DXQuaternionSlerp
(
pout
,
D3DXQuaternionSlerp
(
&
temp1
,
pq1
,
pq2
,
f
+
g
),
D3DXQuaternionSlerp
(
&
temp2
,
pq1
,
pq3
,
f
+
g
),
g
/
(
f
+
g
));
return
pout
;
}
D3DXQUATERNION
*
WINAPI
D3DXQuaternionInverse
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq
)
{
D3DXQUATERNION
temp
;
...
...
dlls/d3dx8/tests/math.c
View file @
e8edc51d
...
...
@@ -554,7 +554,7 @@ static void D3X8QuaternionTest(void)
{
D3DXQUATERNION
expectedquat
,
gotquat
,
nul
,
q
,
r
,
s
,
t
,
u
;
LPD3DXQUATERNION
funcpointer
;
FLOAT
expected
,
got
,
scale
;
FLOAT
expected
,
got
,
scale
,
scale2
;
BOOL
expectedbool
,
gotbool
;
nul
.
x
=
0
.
0
f
;
nul
.
y
=
0
.
0
f
;
nul
.
z
=
0
.
0
f
;
nul
.
w
=
0
.
0
f
;
...
...
@@ -564,6 +564,12 @@ static void D3X8QuaternionTest(void)
u
.
x
=
91
.
0
f
;
u
.
y
=
-
82
.
0
f
;
u
.
z
=
7
.
3
f
;
u
.
w
=
-
6
.
4
f
;
scale
=
0
.
3
f
;
scale2
=
0
.
78
f
;
/*_______________D3DXQuaternionBaryCentric________________________*/
expectedquat
.
x
=
-
867
.
444458
;
expectedquat
.
y
=
87
.
851111
f
;
expectedquat
.
z
=
-
9
.
937778
f
;
expectedquat
.
w
=
3
.
235555
f
;
D3DXQuaternionBaryCentric
(
&
gotquat
,
&
q
,
&
r
,
&
t
,
scale
,
scale2
);
expect_vec4
(
expectedquat
,
gotquat
);
/*_______________D3DXQuaternionConjugate________________*/
expectedquat
.
x
=
-
1
.
0
f
;
expectedquat
.
y
=
-
2
.
0
f
;
expectedquat
.
z
=
-
4
.
0
f
;
expectedquat
.
w
=
10
.
0
f
;
...
...
include/d3dx8math.h
View file @
e8edc51d
...
...
@@ -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
D3DXQuaternionBaryCentric
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq1
,
CONST
D3DXQUATERNION
*
pq2
,
CONST
D3DXQUATERNION
*
pq3
,
FLOAT
f
,
FLOAT
g
);
D3DXQUATERNION
*
WINAPI
D3DXQuaternionInverse
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq
);
D3DXQUATERNION
*
WINAPI
D3DXQuaternionMultiply
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq1
,
CONST
D3DXQUATERNION
*
pq2
);
D3DXQUATERNION
*
WINAPI
D3DXQuaternionNormalize
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq
);
...
...
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