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
cc22eac1
Commit
cc22eac1
authored
Oct 27, 2007
by
David Adam
Committed by
Alexandre Julliard
Oct 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx8: Implement D3DXTransformNormal.
parent
90c4757b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
2 deletions
+30
-2
d3dx8.spec
dlls/d3dx8/d3dx8.spec
+2
-2
math.c
dlls/d3dx8/math.c
+16
-0
math.c
dlls/d3dx8/tests/math.c
+10
-0
d3dx8math.h
include/d3dx8math.h
+2
-0
No files found.
dlls/d3dx8/d3dx8.spec
View file @
cc22eac1
...
...
@@ -4,14 +4,14 @@
@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long)
@ stdcall D3DXVec2Transform(ptr ptr ptr)
@ stdcall D3DXVec2TransformCoord(ptr ptr ptr)
@ st
ub D3DXVec2TransformNormal
@ st
dcall D3DXVec2TransformNormal(ptr ptr ptr)
@ stdcall D3DXVec3Normalize(ptr ptr)
@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long)
@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr long)
@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long)
@ stdcall D3DXVec3Transform(ptr ptr ptr)
@ stdcall D3DXVec3TransformCoord(ptr ptr ptr)
@ st
ub D3DXVec3TransformNormal
@ st
dcall D3DXVec3TransformNormal(ptr ptr ptr)
@ stub D3DXVec3Project
@ stub D3DXVec3Unproject
@ stub D3DXVec4Cross
...
...
dlls/d3dx8/math.c
View file @
cc22eac1
...
...
@@ -127,6 +127,13 @@ D3DXVECTOR2* WINAPI D3DXVec2TransformCoord(D3DXVECTOR2 *pout, CONST D3DXVECTOR2
return
pout
;
}
D3DXVECTOR2
*
WINAPI
D3DXVec2TransformNormal
(
D3DXVECTOR2
*
pout
,
CONST
D3DXVECTOR2
*
pv
,
CONST
D3DXMATRIX
*
pm
)
{
pout
->
x
=
pm
->
m
[
0
][
0
]
*
pv
->
x
+
pm
->
m
[
1
][
0
]
*
pv
->
y
;
pout
->
y
=
pm
->
m
[
0
][
1
]
*
pv
->
x
+
pm
->
m
[
1
][
1
]
*
pv
->
y
;
return
pout
;
}
/*_________________D3DXVec3_____________________*/
D3DXVECTOR3
*
WINAPI
D3DXVec3BaryCentric
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv1
,
CONST
D3DXVECTOR3
*
pv2
,
CONST
D3DXVECTOR3
*
pv3
,
FLOAT
f
,
FLOAT
g
)
...
...
@@ -210,6 +217,15 @@ D3DXVECTOR3* WINAPI D3DXVec3TransformCoord(D3DXVECTOR3 *pout, CONST D3DXVECTOR3
return
pout
;
}
D3DXVECTOR3
*
WINAPI
D3DXVec3TransformNormal
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv
,
CONST
D3DXMATRIX
*
pm
)
{
pout
->
x
=
pm
->
m
[
0
][
0
]
*
pv
->
x
+
pm
->
m
[
1
][
0
]
*
pv
->
y
+
pm
->
m
[
2
][
0
]
*
pv
->
z
;
pout
->
y
=
pm
->
m
[
0
][
1
]
*
pv
->
x
+
pm
->
m
[
1
][
1
]
*
pv
->
y
+
pm
->
m
[
2
][
1
]
*
pv
->
z
;
pout
->
z
=
pm
->
m
[
0
][
2
]
*
pv
->
x
+
pm
->
m
[
1
][
2
]
*
pv
->
y
+
pm
->
m
[
2
][
2
]
*
pv
->
z
;
return
pout
;
}
/*_________________D3DXVec4_____________________*/
D3DXVECTOR4
*
WINAPI
D3DXVec4BaryCentric
(
D3DXVECTOR4
*
pout
,
CONST
D3DXVECTOR4
*
pv1
,
CONST
D3DXVECTOR4
*
pv2
,
CONST
D3DXVECTOR4
*
pv3
,
FLOAT
f
,
FLOAT
g
)
...
...
dlls/d3dx8/tests/math.c
View file @
cc22eac1
...
...
@@ -433,6 +433,11 @@ static void D3X8Vector2Test(void)
expectedvec
.
x
=
0
.
0
f
;
expectedvec
.
y
=
0
.
0
f
;
D3DXVec2TransformCoord
(
&
gotvec
,
&
nulproj
,
&
mat
);
expect_vec
(
expectedvec
,
gotvec
);
/*_______________D3DXVec2TransformNormal______________________*/
expectedvec
.
x
=
23
.
0
f
;
expectedvec
.
y
=
30
.
0
f
;
D3DXVec2TransformNormal
(
&
gotvec
,
&
u
,
&
mat
);
expect_vec
(
expectedvec
,
gotvec
);
}
static
void
D3X8Vector3Test
(
void
)
...
...
@@ -596,6 +601,11 @@ static void D3X8Vector3Test(void)
expectedvec
.
x
=
0
.
0
f
;
expectedvec
.
y
=
0
.
0
f
;
expectedvec
.
z
=
0
.
0
f
;
D3DXVec3TransformCoord
(
&
gotvec
,
&
nulproj
,
&
mat
);
expect_vec3
(
expectedvec
,
gotvec
);
/*_______________D3DXVec3TransformNormal______________________*/
expectedvec
.
x
=
57
.
0
f
;
expectedvec
.
y
=
74
.
0
f
;
expectedvec
.
z
=
91
.
0
f
;
D3DXVec3TransformNormal
(
&
gotvec
,
&
u
,
&
mat
);
expect_vec3
(
expectedvec
,
gotvec
);
}
static
void
D3X8Vector4Test
(
void
)
...
...
include/d3dx8math.h
View file @
cc22eac1
...
...
@@ -66,6 +66,7 @@ D3DXVECTOR2* WINAPI D3DXVec2Hermite(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 *pv1, C
D3DXVECTOR2
*
WINAPI
D3DXVec2Normalize
(
D3DXVECTOR2
*
pout
,
CONST
D3DXVECTOR2
*
pv
);
D3DXVECTOR4
*
WINAPI
D3DXVec2Transform
(
D3DXVECTOR4
*
pout
,
CONST
D3DXVECTOR2
*
pv
,
CONST
D3DXMATRIX
*
pm
);
D3DXVECTOR2
*
WINAPI
D3DXVec2TransformCoord
(
D3DXVECTOR2
*
pout
,
CONST
D3DXVECTOR2
*
pv
,
CONST
D3DXMATRIX
*
pm
);
D3DXVECTOR2
*
WINAPI
D3DXVec2TransformNormal
(
D3DXVECTOR2
*
pout
,
CONST
D3DXVECTOR2
*
pv
,
CONST
D3DXMATRIX
*
pm
);
D3DXVECTOR3
*
WINAPI
D3DXVec3BaryCentric
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv1
,
CONST
D3DXVECTOR3
*
pv2
,
CONST
D3DXVECTOR3
*
pv3
,
FLOAT
f
,
FLOAT
g
);
D3DXVECTOR3
*
WINAPI
D3DXVec3CatmullRom
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv0
,
CONST
D3DXVECTOR3
*
pv1
,
CONST
D3DXVECTOR3
*
pv2
,
CONST
D3DXVECTOR3
*
pv3
,
FLOAT
s
);
...
...
@@ -73,6 +74,7 @@ D3DXVECTOR3* WINAPI D3DXVec3Hermite(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv1, C
D3DXVECTOR3
*
WINAPI
D3DXVec3Normalize
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv
);
D3DXVECTOR4
*
WINAPI
D3DXVec3Transform
(
D3DXVECTOR4
*
pout
,
CONST
D3DXVECTOR3
*
pv
,
CONST
D3DXMATRIX
*
pm
);
D3DXVECTOR3
*
WINAPI
D3DXVec3TransformCoord
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv
,
CONST
D3DXMATRIX
*
pm
);
D3DXVECTOR3
*
WINAPI
D3DXVec3TransformNormal
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv
,
CONST
D3DXMATRIX
*
pm
);
D3DXVECTOR4
*
WINAPI
D3DXVec4BaryCentric
(
D3DXVECTOR4
*
pout
,
CONST
D3DXVECTOR4
*
pv1
,
CONST
D3DXVECTOR4
*
pv2
,
CONST
D3DXVECTOR4
*
pv3
,
FLOAT
f
,
FLOAT
g
);
D3DXVECTOR4
*
WINAPI
D3DXVec4CatmullRom
(
D3DXVECTOR4
*
pout
,
CONST
D3DXVECTOR4
*
pv0
,
CONST
D3DXVECTOR4
*
pv1
,
CONST
D3DXVECTOR4
*
pv2
,
CONST
D3DXVECTOR4
*
pv3
,
FLOAT
s
);
...
...
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