[ODE] Bug in dGeomTriMeshGetTriangle and dGeomTriMeshGetPoint

Erwin de Vries erwin at vo.com
Thu Jul 17 10:00:02 2003


Yikes, you're right. Will commit the fixes soon along with some other
changes.

Erwin

----- Original Message -----
From: "Ivan Baran" <ivan.baran@vrm.sk>
To: <ode@q12.org>
Sent: Thursday, July 17, 2003 15:05
Subject: [ODE] Bug in dGeomTriMeshGetTriangle and dGeomTriMeshGetPoint


i tried to draw a triangle... and what i find...  i think that there is a
simple bug in collision_trimesh.cpp

    void dGeomTriMeshGetTriangle(dGeomID g, int Index, dVector3*
v0,dVector3* v1, dVector3* v2){
    ....
        FetchTriangle(Geom, Index, Rotation, Position, v);     // Original
        FetchTriangle(Geom, Index, Position, Rotation, v);     // Corrected
    ...
    }

and

    void dGeomTriMeshGetPoint(dGeomID g, int Index, dReal u, dReal v,
dVector3 Out){
        ....
        FetchTriangle(Geom, Index, Rotation, Position, v);     // Original
        FetchTriangle(Geom, Index, Position, Rotation, v);     // Corrected
        ...

    }

because function defining in collision_trimesh_internal.h is

inline void FetchTriangle(dxTriMesh* TriMesh, int Index, const dVector3
Position, const dMatrix3 Rotation, dVector3 Out[3])
{
....
}

ivanba