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
345994fb
Commit
345994fb
authored
Nov 20, 2007
by
David Adam
Committed by
Alexandre Julliard
Nov 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx8: Implement D3DXQuaternionRotationAxis.
parent
7a4490c0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
1 deletion
+26
-1
d3dx8.spec
dlls/d3dx8/d3dx8.spec
+1
-1
math.c
dlls/d3dx8/math.c
+12
-0
math.c
dlls/d3dx8/tests/math.c
+12
-0
d3dx8math.h
include/d3dx8math.h
+1
-0
No files found.
dlls/d3dx8/d3dx8.spec
View file @
345994fb
...
...
@@ -51,7 +51,7 @@
@ stdcall D3DXMatrixReflect(ptr ptr)
@ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr)
@ stub D3DXQuaternionRotationMatrix
@ st
ub D3DXQuaternionRotationAxis
@ st
dcall D3DXQuaternionRotationAxis(ptr ptr long)
@ stub D3DXQuaternionRotationYawPitchRoll
@ stdcall D3DXQuaternionMultiply(ptr ptr ptr)
@ stdcall D3DXQuaternionNormalize(ptr ptr)
...
...
dlls/d3dx8/math.c
View file @
345994fb
...
...
@@ -643,6 +643,18 @@ D3DXQUATERNION* WINAPI D3DXQuaternionNormalize(D3DXQUATERNION *pout, CONST D3DXQ
return
pout
;
}
D3DXQUATERNION
*
WINAPI
D3DXQuaternionRotationAxis
(
D3DXQUATERNION
*
pout
,
CONST
D3DXVECTOR3
*
pv
,
FLOAT
angle
)
{
D3DXVECTOR3
temp
;
D3DXVec3Normalize
(
&
temp
,
pv
);
pout
->
x
=
sin
(
angle
/
2
.
0
f
)
*
temp
.
x
;
pout
->
y
=
sin
(
angle
/
2
.
0
f
)
*
temp
.
y
;
pout
->
z
=
sin
(
angle
/
2
.
0
f
)
*
temp
.
z
;
pout
->
w
=
cos
(
angle
/
2
.
0
f
);
return
pout
;
}
D3DXQUATERNION
*
WINAPI
D3DXQuaternionSlerp
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq1
,
CONST
D3DXQUATERNION
*
pq2
,
FLOAT
t
)
{
FLOAT
dot
,
epsilon
;
...
...
dlls/d3dx8/tests/math.c
View file @
345994fb
...
...
@@ -656,6 +656,18 @@ static void D3X8QuaternionTest(void)
D3DXQuaternionNormalize
(
&
gotquat
,
&
nul
);
expect_vec4
(
expectedquat
,
gotquat
);
/*_______________D3DXQuaternionRotationAxis___________________*/
axis
.
x
=
2
.
0
f
;
axis
.
y
=
7
.
0
;
axis
.
z
=
13
.
0
f
;
angle
=
D3DX_PI
/
3
.
0
f
;
expectedquat
.
x
=
0
.
067116
;
expectedquat
.
y
=
0
.
234905
f
;
expectedquat
.
z
=
0
.
436251
f
;
expectedquat
.
w
=
0
.
866025
f
;
D3DXQuaternionRotationAxis
(
&
gotquat
,
&
axis
,
angle
);
expect_vec4
(
expectedquat
,
gotquat
);
/* Test the nul quaternion */
axis
.
x
=
0
.
0
f
;
axis
.
y
=
0
.
0
;
axis
.
z
=
0
.
0
f
;
expectedquat
.
x
=
0
.
0
f
;
expectedquat
.
y
=
0
.
0
f
;
expectedquat
.
z
=
0
.
0
f
;
expectedquat
.
w
=
0
.
866025
f
;
D3DXQuaternionRotationAxis
(
&
gotquat
,
&
axis
,
angle
);
expect_vec4
(
expectedquat
,
gotquat
);
/*_______________D3DXQuaternionSlerp________________________*/
expectedquat
.
x
=
-
0
.
2
f
;
expectedquat
.
y
=
2
.
6
f
;
expectedquat
.
z
=
1
.
3
f
;
expectedquat
.
w
=
9
.
1
f
;
D3DXQuaternionSlerp
(
&
gotquat
,
&
q
,
&
r
,
scale
);
...
...
include/d3dx8math.h
View file @
345994fb
...
...
@@ -306,6 +306,7 @@ D3DXQUATERNION* WINAPI D3DXQuaternionBaryCentric(D3DXQUATERNION *pout, CONST D3D
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
);
D3DXQUATERNION
*
WINAPI
D3DXQuaternionRotationAxis
(
D3DXQUATERNION
*
pout
,
CONST
D3DXVECTOR3
*
pv
,
FLOAT
angle
);
D3DXQUATERNION
*
WINAPI
D3DXQuaternionSlerp
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq1
,
CONST
D3DXQUATERNION
*
pq2
,
FLOAT
t
);
D3DXQUATERNION
*
WINAPI
D3DXQuaternionSquad
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq1
,
CONST
D3DXQUATERNION
*
pq2
,
CONST
D3DXQUATERNION
*
pq3
,
CONST
D3DXQUATERNION
*
pq4
,
FLOAT
t
);
void
WINAPI
D3DXQuaternionToAxisAngle
(
CONST
D3DXQUATERNION
*
pq
,
D3DXVECTOR3
*
paxis
,
FLOAT
*
pangle
);
...
...
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