-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.TXT
50 lines (40 loc) · 1.93 KB
/
README.TXT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
NifMopp 1.0.0.1
=================
This file is a helper library for accessing Havok libraries for generating
MOPP code from meshes.
Usage
-----
VC++
----
struct Vector3 { float a, b, c; }
struct Triangle { short a, b, c; }
typedef int (__stdcall * fnGenerateMoppCode)(int nVerts, Vector3 const* verts, int nTris, Triangle const *tris);
typedef int (__stdcall * fnRetrieveMoppCode)(int nBuffer, unsigned char *buffer);
typedef int (__stdcall * fnRetrieveMoppScale)(float *value);
typedef int (__stdcall * fnRetrieveMoppOrigin)(Vector3 *value);
HMODULE hMoppLib = LoadLibrary( _T("NifMopp.dll") );
if (0 != hMoppLib)
{
fnGenerateMoppCode GenerateMoppCode = (fnGenerateMoppCode)GetProcAddress( hMoppLib, _T("GenerateMoppCode") );
fnRetrieveMoppCode RetrieveMoppCode = (fnRetrieveMoppCode)GetProcAddress( hMoppLib, _T("RetrieveMoppCode") );
fnRetrieveMoppScale RetrieveMoppScale = (fnRetrieveMoppScale)GetProcAddress( hMoppLib, _T("RetrieveMoppScale") );
fnRetrieveMoppOrigin RetrieveMoppOrigin = (fnRetrieveMoppOrigin)GetProcAddress( hMoppLib, _T("RetrieveMoppOrigin") );
if ( NULL != GenerateMoppCode && NULL != RetrieveMoppCode
&& NULL != RetrieveMoppScale && NULL != RetrieveMoppOrigin
)
{
int len = GenerateMoppCode( nv, v, nt, t );
if ( len > 0 )
{
byte* code = malloc( len );
if ( 0 != RetrieveMoppCode( len , code ) )
{
float scale = 0.0f;
Vector3 origin;
RetrieveMoppScale( &scale );
RetrieveMoppScale( &origin );
}
}
}
FreeLibrary( hMoppLib );
}