Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8716c62c
Commit
8716c62c
authored
Feb 03, 2009
by
David Adam
Committed by
Alexandre Julliard
Feb 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9_36: Implement D3DXIntersectTri.
parent
b8eb4cf8
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
113 additions
and
1 deletion
+113
-1
Makefile.in
dlls/d3dx9_36/Makefile.in
+1
-0
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+1
-1
mesh.c
dlls/d3dx9_36/mesh.c
+72
-0
Makefile.in
include/Makefile.in
+1
-0
d3dx9mesh.h
include/d3dx9mesh.h
+38
-0
No files found.
dlls/d3dx9_36/Makefile.in
View file @
8716c62c
...
...
@@ -10,6 +10,7 @@ C_SRCS = \
d3dx9_36_main.c
\
font.c
\
math.c
\
mesh.c
\
shader.c
\
sprite.c
...
...
dlls/d3dx9_36/d3dx9_36.spec
View file @
8716c62c
...
...
@@ -167,7 +167,7 @@
@ stdcall D3DXGetVertexShaderProfile(ptr)
@ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx8.D3DXIntersect
@ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx8.D3DXIntersectSubset
@ st
ub D3DXIntersectTri
@ st
dcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr)
@ stub D3DXLoadMeshFromXA
@ stub D3DXLoadMeshFromXInMemory
@ stub D3DXLoadMeshFromXResource
...
...
dlls/d3dx9_36/mesh.c
0 → 100644
View file @
8716c62c
/*
* Mesh operations specific to D3DX9.
*
* Copyright (C) 2009 David Adam
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "windef.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "d3dx9.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3dx
);
/*************************************************************************
* D3DXIntersectTri
*/
BOOL
WINAPI
D3DXIntersectTri
(
CONST
D3DXVECTOR3
*
p0
,
CONST
D3DXVECTOR3
*
p1
,
CONST
D3DXVECTOR3
*
p2
,
CONST
D3DXVECTOR3
*
praypos
,
CONST
D3DXVECTOR3
*
praydir
,
FLOAT
*
pu
,
FLOAT
*
pv
,
FLOAT
*
pdist
)
{
D3DXMATRIX
m
;
D3DXVECTOR4
vec
;
m
.
m
[
0
][
0
]
=
p1
->
x
-
p0
->
x
;
m
.
m
[
1
][
0
]
=
p2
->
x
-
p0
->
x
;
m
.
m
[
2
][
0
]
=
-
praydir
->
x
;
m
.
m
[
3
][
0
]
=
0
.
0
f
;
m
.
m
[
0
][
1
]
=
p1
->
y
-
p0
->
z
;
m
.
m
[
1
][
1
]
=
p2
->
y
-
p0
->
z
;
m
.
m
[
2
][
1
]
=
-
praydir
->
y
;
m
.
m
[
3
][
1
]
=
0
.
0
f
;
m
.
m
[
0
][
2
]
=
p1
->
z
-
p0
->
z
;
m
.
m
[
1
][
2
]
=
p2
->
z
-
p0
->
z
;
m
.
m
[
2
][
2
]
=
-
praydir
->
z
;
m
.
m
[
3
][
2
]
=
0
.
0
f
;
m
.
m
[
0
][
3
]
=
0
.
0
f
;
m
.
m
[
1
][
3
]
=
0
.
0
f
;
m
.
m
[
2
][
3
]
=
0
.
0
f
;
m
.
m
[
3
][
3
]
=
1
.
0
f
;
vec
.
x
=
praypos
->
x
-
p0
->
x
;
vec
.
y
=
praypos
->
y
-
p0
->
y
;
vec
.
z
=
praypos
->
z
-
p0
->
z
;
vec
.
w
=
0
.
0
f
;
if
(
D3DXMatrixInverse
(
&
m
,
NULL
,
&
m
)
)
{
D3DXVec4Transform
(
&
vec
,
&
vec
,
&
m
);
if
(
(
vec
.
x
>=
0
.
0
f
)
&&
(
vec
.
y
>=
0
.
0
f
)
&&
(
vec
.
x
+
vec
.
y
<=
1
.
0
f
)
&&
(
vec
.
z
>=
0
.
0
f
)
)
{
*
pu
=
vec
.
x
;
*
pv
=
vec
.
y
;
*
pdist
=
fabs
(
vec
.
z
);
return
TRUE
;
}
}
return
FALSE
;
}
include/Makefile.in
View file @
8716c62c
...
...
@@ -144,6 +144,7 @@ SRCDIR_INCLUDES = \
d3dx9core.h
\
d3dx9math.h
\
d3dx9math.inl
\
d3dx9mesh.h
\
d3dx9shader.h
\
d3dx9tex.h
\
dbghelp.h
\
...
...
include/d3dx9mesh.h
0 → 100644
View file @
8716c62c
/*
* Copyright (C) 2009 David Adam
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_D3DX9MESH_H
#define __WINE_D3DX9MESH_H
#include <d3dx9.h>
#ifdef __cplusplus
extern
"C"
{
#endif
HRESULT
WINAPI
D3DXCreateBuffer
(
DWORD
,
LPD3DXBUFFER
*
);
UINT
WINAPI
D3DXGetFVFVertexSize
(
DWORD
);
BOOL
WINAPI
D3DXBoxBoundProbe
(
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
);
BOOL
WINAPI
D3DXSphereBoundProbe
(
CONST
D3DXVECTOR3
*
,
FLOAT
,
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
);
BOOL
WINAPI
D3DXIntersectTri
(
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
,
FLOAT
*
,
FLOAT
*
,
FLOAT
*
);
#ifdef __cplusplus
}
#endif
#endif
/* __WINE_D3DX9MESH_H */
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