[ODE] Fwd: [ opende-Feature Requests-1526353 ] Trimesh-Collision: last_trans member one level up

Jason Perkins starkos at gmail.com
Fri Jul 21 05:06:35 MST 2006


FYI...this sounds like good suggestion...

j

---------- Forwarded message ----------
From: SourceForge.net <noreply at sourceforge.net>
Subject: [ opende-Feature Requests-1526353 ] Trimesh-Collision:
last_trans member one level up

Currently the last_trans-matrix is stored in the
Mesh-Resource aka TriMeshData. This is a problem, if i
am having two TriMeshes to collide but share the same
TriMeshData.

So I have put it into the struct dxTriMesh by declaring
it in collision_trimesh_internal.h

Every access to the last_trans Member of dxTriMeshData
in  collision_trimesh_trimesh.cpp was then redirected
to the dxTriMesh-last_trans by me.

Finally, to get access to this dxTriMesh-Level
last_trans i have added

void dGeomTriMeshSetLastTransform(dxTriMesh* g, double*
elem)
{

    for (int i=0; i<4; i++)
        for (int j=0; j<4; j++)
            g->instance_last_trans.m[i][j] = (dReal) elem[i*4
+ j];


    return;
}

in collision_trimesh.cpp. Also i have declared
in its header collision_trimesh.h :
typedef struct dxTriMesh* dTriMeshID;


regards,
Michael
_________________________________

GameDevelopment M. Molkenthin ·
Lerchenstr. 98 · 22767 Hamburg

gamedev at michael-molkenthin.de
http · www.michael-molkenthin.de ·
www.igda.org/hamburg




----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=382802&aid=1526353&group_id=24884



More information about the ODE mailing list