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
4a289455
Commit
4a289455
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 D3DXPlaneTransform.
parent
54d3bb28
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
1 deletion
+25
-1
d3dx8.spec
dlls/d3dx8/d3dx8.spec
+1
-1
math.c
dlls/d3dx8/math.c
+9
-0
math.c
dlls/d3dx8/tests/math.c
+14
-0
d3dx8math.h
include/d3dx8math.h
+1
-0
No files found.
dlls/d3dx8/d3dx8.spec
View file @
4a289455
...
...
@@ -65,7 +65,7 @@
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
@ st
ub D3DXPlaneTransform
@ st
dcall D3DXPlaneTransform(ptr ptr ptr)
@ stub D3DXColorAdjustSaturation
@ stub D3DXColorAdjustContrast
@ stub D3DXCreateMatrixStack
...
...
dlls/d3dx8/math.c
View file @
4a289455
...
...
@@ -547,6 +547,15 @@ D3DXPLANE* WINAPI D3DXPlaneNormalize(D3DXPLANE *pout, CONST D3DXPLANE *pp)
return
pout
;
}
D3DXPLANE
*
WINAPI
D3DXPlaneTransform
(
D3DXPLANE
*
pout
,
CONST
D3DXPLANE
*
pplane
,
CONST
D3DXMATRIX
*
pm
)
{
pout
->
a
=
pm
->
u
.
m
[
0
][
0
]
*
pplane
->
a
+
pm
->
u
.
m
[
1
][
0
]
*
pplane
->
b
+
pm
->
u
.
m
[
2
][
0
]
*
pplane
->
c
+
pm
->
u
.
m
[
3
][
0
]
*
pplane
->
d
;
pout
->
b
=
pm
->
u
.
m
[
0
][
1
]
*
pplane
->
a
+
pm
->
u
.
m
[
1
][
1
]
*
pplane
->
b
+
pm
->
u
.
m
[
2
][
1
]
*
pplane
->
c
+
pm
->
u
.
m
[
3
][
1
]
*
pplane
->
d
;
pout
->
c
=
pm
->
u
.
m
[
0
][
2
]
*
pplane
->
a
+
pm
->
u
.
m
[
1
][
2
]
*
pplane
->
b
+
pm
->
u
.
m
[
2
][
2
]
*
pplane
->
c
+
pm
->
u
.
m
[
3
][
2
]
*
pplane
->
d
;
pout
->
d
=
pm
->
u
.
m
[
0
][
3
]
*
pplane
->
a
+
pm
->
u
.
m
[
1
][
3
]
*
pplane
->
b
+
pm
->
u
.
m
[
2
][
3
]
*
pplane
->
c
+
pm
->
u
.
m
[
3
][
3
]
*
pplane
->
d
;
return
pout
;
}
/*_________________D3DXQUATERNION________________*/
D3DXQUATERNION
*
WINAPI
D3DXQuaternionNormalize
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq
)
...
...
dlls/d3dx8/tests/math.c
View file @
4a289455
...
...
@@ -436,12 +436,21 @@ static void D3DXMatrixTest(void)
static
void
D3DXPlaneTest
(
void
)
{
D3DXMATRIX
mat
;
D3DXPLANE
expectedplane
,
gotplane
,
nulplane
,
plane
;
D3DXVECTOR3
expectedvec
,
gotvec
,
vec1
,
vec2
,
vec3
;
LPD3DXVECTOR3
funcpointer
;
D3DXVECTOR4
vec
;
FLOAT
expected
,
got
;
U
(
mat
).
m
[
0
][
1
]
=
5
.
0
f
;
U
(
mat
).
m
[
0
][
2
]
=
7
.
0
f
;
U
(
mat
).
m
[
0
][
3
]
=
8
.
0
f
;
U
(
mat
).
m
[
1
][
0
]
=
11
.
0
f
;
U
(
mat
).
m
[
1
][
2
]
=
16
.
0
f
;
U
(
mat
).
m
[
1
][
3
]
=
33
.
0
f
;
U
(
mat
).
m
[
2
][
0
]
=
19
.
0
f
;
U
(
mat
).
m
[
2
][
1
]
=
-
21
.
0
f
;
U
(
mat
).
m
[
2
][
3
]
=
43
.
0
f
;
U
(
mat
).
m
[
3
][
0
]
=
2
.
0
f
;
U
(
mat
).
m
[
3
][
1
]
=
3
.
0
f
;
U
(
mat
).
m
[
3
][
2
]
=
-
4
.
0
f
;
U
(
mat
).
m
[
0
][
0
]
=
10
.
0
f
;
U
(
mat
).
m
[
1
][
1
]
=
20
.
0
f
;
U
(
mat
).
m
[
2
][
2
]
=
30
.
0
f
;
U
(
mat
).
m
[
3
][
3
]
=
-
40
.
0
f
;
plane
.
a
=
-
3
.
0
f
;
plane
.
b
=
-
1
.
0
f
;
plane
.
c
=
4
.
0
f
;
plane
.
d
=
7
.
0
f
;
vec
.
x
=
2
.
0
f
;
vec
.
y
=
5
.
0
f
;
vec
.
z
=
-
6
.
0
f
;
vec
.
w
=
11
.
0
f
;
...
...
@@ -524,6 +533,11 @@ static void D3DXPlaneTest(void)
expectedplane
.
a
=
0
.
0
f
;
expectedplane
.
b
=
0
.
0
f
;
expectedplane
.
c
=
0
.
0
f
;
expectedplane
.
d
=
0
.
0
f
;
D3DXPlaneNormalize
(
&
gotplane
,
&
nulplane
);
expect_plane
(
expectedplane
,
gotplane
);
/*_______________D3DXPlaneTransform____________*/
expectedplane
.
a
=
49
.
0
f
;
expectedplane
.
b
=
-
98
.
0
f
;
expectedplane
.
c
=
55
.
0
f
;
expectedplane
.
d
=
-
165
.
0
f
;
D3DXPlaneTransform
(
&
gotplane
,
&
plane
,
&
mat
);
expect_plane
(
expectedplane
,
gotplane
);
}
static
void
D3X8QuaternionTest
(
void
)
...
...
include/d3dx8math.h
View file @
4a289455
...
...
@@ -297,6 +297,7 @@ D3DXPLANE* WINAPI D3DXPlaneFromPointNormal(D3DXPLANE *pout, CONST D3DXVECTOR3 *p
D3DXPLANE
*
WINAPI
D3DXPlaneFromPoints
(
D3DXPLANE
*
pout
,
CONST
D3DXVECTOR3
*
pv1
,
CONST
D3DXVECTOR3
*
pv2
,
CONST
D3DXVECTOR3
*
pv3
);
D3DXVECTOR3
*
WINAPI
D3DXPlaneIntersectLine
(
D3DXVECTOR3
*
pout
,
CONST
D3DXPLANE
*
pp
,
CONST
D3DXVECTOR3
*
pv1
,
CONST
D3DXVECTOR3
*
pv2
);
D3DXPLANE
*
WINAPI
D3DXPlaneNormalize
(
D3DXPLANE
*
pout
,
CONST
D3DXPLANE
*
pp
);
D3DXPLANE
*
WINAPI
D3DXPlaneTransform
(
D3DXPLANE
*
pout
,
CONST
D3DXPLANE
*
pplane
,
CONST
D3DXMATRIX
*
pm
);
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