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
170023e3
Commit
170023e3
authored
Jul 28, 2008
by
David Adam
Committed by
Alexandre Julliard
Jul 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx8: Only the points in the positive ray are taken in account in D3DXSphereBoundProbe.
parent
278f806a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
mesh.c
dlls/d3dx8/mesh.c
+3
-2
mesh.c
dlls/d3dx8/tests/mesh.c
+4
-0
No files found.
dlls/d3dx8/mesh.c
View file @
170023e3
...
@@ -27,13 +27,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
...
@@ -27,13 +27,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
BOOL
WINAPI
D3DXSphereBoundProbe
(
CONST
D3DXVECTOR3
*
pcenter
,
FLOAT
radius
,
CONST
D3DXVECTOR3
*
prayposition
,
CONST
D3DXVECTOR3
*
praydirection
)
BOOL
WINAPI
D3DXSphereBoundProbe
(
CONST
D3DXVECTOR3
*
pcenter
,
FLOAT
radius
,
CONST
D3DXVECTOR3
*
prayposition
,
CONST
D3DXVECTOR3
*
praydirection
)
{
{
D3DXVECTOR3
difference
;
D3DXVECTOR3
difference
;
FLOAT
a
,
b
,
c
;
FLOAT
a
,
b
,
c
,
d
;
a
=
D3DXVec3LengthSq
(
praydirection
);
a
=
D3DXVec3LengthSq
(
praydirection
);
if
(
!
D3DXVec3Subtract
(
&
difference
,
prayposition
,
pcenter
))
return
FALSE
;
if
(
!
D3DXVec3Subtract
(
&
difference
,
prayposition
,
pcenter
))
return
FALSE
;
b
=
D3DXVec3Dot
(
&
difference
,
praydirection
);
b
=
D3DXVec3Dot
(
&
difference
,
praydirection
);
c
=
D3DXVec3LengthSq
(
&
difference
)
-
radius
*
radius
;
c
=
D3DXVec3LengthSq
(
&
difference
)
-
radius
*
radius
;
d
=
b
*
b
-
a
*
c
;
if
(
b
*
b
-
a
*
c
<=
0
.
0
f
)
return
FALSE
;
if
(
(
d
<=
0
.
0
f
)
||
(
sqrt
(
d
)
<=
b
)
)
return
FALSE
;
return
TRUE
;
return
TRUE
;
}
}
dlls/d3dx8/tests/mesh.c
View file @
170023e3
...
@@ -36,6 +36,10 @@ static void D3DXBoundProbeTest(void)
...
@@ -36,6 +36,10 @@ static void D3DXBoundProbeTest(void)
result
=
D3DXSphereBoundProbe
(
&
center
,
radius
,
&
rayposition
,
&
raydirection
);
result
=
D3DXSphereBoundProbe
(
&
center
,
radius
,
&
rayposition
,
&
raydirection
);
ok
(
result
==
TRUE
,
"expected TRUE, received FALSE
\n
"
);
ok
(
result
==
TRUE
,
"expected TRUE, received FALSE
\n
"
);
rayposition
.
x
=
45
.
0
f
;
rayposition
.
y
=
-
75
.
0
f
;
rayposition
.
z
=
49
.
0
f
;
result
=
D3DXSphereBoundProbe
(
&
center
,
radius
,
&
rayposition
,
&
raydirection
);
ok
(
result
==
FALSE
,
"expected FALSE, received TRUE
\n
"
);
rayposition
.
x
=
5
.
0
f
;
rayposition
.
y
=
7
.
0
f
;
rayposition
.
z
=
9
.
0
f
;
rayposition
.
x
=
5
.
0
f
;
rayposition
.
y
=
7
.
0
f
;
rayposition
.
z
=
9
.
0
f
;
result
=
D3DXSphereBoundProbe
(
&
center
,
radius
,
&
rayposition
,
&
raydirection
);
result
=
D3DXSphereBoundProbe
(
&
center
,
radius
,
&
rayposition
,
&
raydirection
);
ok
(
result
==
FALSE
,
"expected FALSE, received TRUE
\n
"
);
ok
(
result
==
FALSE
,
"expected FALSE, received TRUE
\n
"
);
...
...
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