Witam, mam problem z getvertex, uzywam Tv3D + PhysX. Kod:
public Actor CreateMeshActor(TVMesh mesh, TV_3DVECTOR pos)
{
int vert_count, index_count;
TV_3DVECTOR[] vertices;
int[] indices;
vert_count = mesh.GetVertexCount();
index_count = mesh.GetTriangleCount();
vertices = new TV_3DVECTOR[(int)vert_count / 3];
indices = new int[index_count * 3];
float[] f = new float[10]; int iColor;
for (int i = 0; i < vert_count; i++)
{
<b>mesh.GetVertex(i, f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7], f[8], f[9], iColor);</b>
if (i % 3 == 0) vertices[(int)i / 3].x = f[0];
if (i % 3 == 1) vertices[(int)i / 3].y = f[1];
if (i % 3 == 2) vertices[(int)i / 3].z = f[2];
}
int[] t = new int[4];
for (int i = 0; i < index_count; i++)
{
<b>mesh.GetTriangleInfo(i, t[0], t[1], t[2], t[3]);</b>
indices[i * 3 / 3] = t[0];
indices[i * 3 + 1] = t[1];
indices[i * 3 + 2] = t[2];
}
.
.
.
Error 1 The best overloaded method match for 'MTV3D65.TVMesh.GetVertex(int, ref float, ref float, ref float, ref float, ref float, ref float, ref float, ref float, ref float, ref float, ref int)' has some invalid arguments C:\Documents and Settings\Bartek\Moje dokumenty\Visual Studio 2008\Projects\Slr3\Slr3\Vehicle.cs
Error 13 The best overloaded method match for 'MTV3D65.TVMesh.GetTriangleInfo(int, ref int, ref int, ref int, ref int)' has some invalid arguments C:\Documents and Settings\Bartek\Moje dokumenty\Visual Studio 2008\Projects\Slr3\Slr3\Vehicle.cs
Probowałem wszystkiego... ale pierwszy raz spotkałem się z takim dziwnym problemem. Argumenty są w porządku, tyle ile powinno byc. Gdyby ktoś mógł mi pomóc byłbym wdzięczny.
Pozdrawiam Marcin