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
7fccb042
Commit
7fccb042
authored
Apr 19, 2007
by
David Adam
Committed by
Alexandre Julliard
Apr 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Implement D3DRMVectorReflect.
parent
f9e6f42b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
d3drm.spec
dlls/d3drm/d3drm.spec
+1
-1
math.c
dlls/d3drm/math.c
+8
-0
vector.c
dlls/d3drm/tests/vector.c
+8
-1
No files found.
dlls/d3drm/d3drm.spec
View file @
7fccb042
...
...
@@ -14,7 +14,7 @@
@ stdcall D3DRMVectorModulus(ptr)
@ stdcall D3DRMVectorNormalize(ptr)
@ stdcall D3DRMVectorRandom(ptr)
@ st
ub D3DRMVectorReflect
@ st
dcall D3DRMVectorReflect(ptr ptr ptr)
@ stub D3DRMVectorRotate
@ stdcall D3DRMVectorScale(ptr ptr long)
@ stdcall D3DRMVectorSubtract(ptr ptr ptr)
...
...
dlls/d3drm/math.c
View file @
7fccb042
...
...
@@ -102,6 +102,14 @@ LPD3DVECTOR WINAPI D3DRMVectorRandom(LPD3DVECTOR d)
return
d
;
}
/* Reflection of a vector on a surface */
LPD3DVECTOR
WINAPI
D3DRMVectorReflect
(
LPD3DVECTOR
r
,
LPD3DVECTOR
ray
,
LPD3DVECTOR
norm
)
{
D3DVECTOR
sca
;
D3DRMVectorSubtract
(
r
,
D3DRMVectorScale
(
&
sca
,
norm
,
2
.
0
*
D3DRMVectorDotProduct
(
ray
,
norm
)),
ray
);
return
r
;
}
/* Scale a vector */
LPD3DVECTOR
WINAPI
D3DRMVectorScale
(
LPD3DVECTOR
d
,
LPD3DVECTOR
s
,
D3DVALUE
factor
)
{
...
...
dlls/d3drm/tests/vector.c
View file @
7fccb042
...
...
@@ -33,7 +33,7 @@
void
VectorTest
(
void
)
{
D3DVALUE
mod
,
par
;
D3DVECTOR
e
,
r
,
u
,
v
,
casnul
;
D3DVECTOR
e
,
r
,
u
,
v
,
casnul
,
norm
,
ray
;
u
.
x
=
2
.
0
;
u
.
y
=
2
.
0
;
u
.
z
=
1
.
0
;
v
.
x
=
4
.
0
;
v
.
y
=
4
.
0
;
v
.
z
=
0
.
0
;
...
...
@@ -73,6 +73,13 @@ void VectorTest(void)
e
.
x
=
1
.
0
;
e
.
y
=
0
.
0
;
e
.
z
=
0
.
0
;
expect_vec
(
e
,
casnul
);
/*____________________VectorReflect_________________________________*/
ray
.
x
=
3
.
0
;
ray
.
y
=-
4
.
0
;
ray
.
z
=
5
.
0
;
norm
.
x
=
1
.
0
;
norm
.
y
=-
2
.
0
;
norm
.
z
=
6
.
0
;
e
.
x
=
79
.
0
;
e
.
y
=-
160
.
0
;
e
.
z
=
487
.
0
;
D3DRMVectorReflect
(
&
r
,
&
ray
,
&
norm
);
expect_vec
(
e
,
r
);
/*_______________________VectorScale__________________________*/
par
=
2
.
5
;
D3DRMVectorScale
(
&
r
,
&
v
,
par
);
...
...
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