[ODE] New stuff

Erwin de Vries erwin at vo.com
Mon Sep 2 07:22:01 2002


> Not sure if this is still useful, but here's my feedback from the sources
you posted on August 18th...
>
> - opcode 1.2 wraps the Point and other math classes in a IceMath
namespace.  you assume they are in the Opcode namespace.

But what is the problem here?

> - dRay_Box.cpp: Clip() does not return a value from all control paths

Already found it. It could cause problems in the normal finding process, but
i havent seen it myself. Just place "else return -1;" at the end to be sure.

> - dRay.cpp: dGeomRayGet/Set() use " * 4" instead of " * 3" on the
Rotation[] matrix and cause illegal access violations

I dont think the * 4 is an error. What i did to fix it is this:
Right[3] = REAL(0.0);
Up[3] = REAL(0.0);
Direction[3] = REAL(0.0);

Now it is fine.

> - dxTriList.h: FetchVertex() has a comma operator in it.  i don't think
you intended that...
>
> // Fetches a vertex
> inline const dcVector3& FetchVertex(dxTriListData* TLData, int Index){
> return (const dcVector3&)(((char*)TLData->Vertices)[TLData, Index *
TLData->VertexStride]);
>     ^-- did you mean this??
> }

... Not exactly. You can remove the TLData......

> The new contact point generation is much better!  My sphere vs mesh
collision problems went away.

To improve accuracy you can just return true in the beginning of
OPC_SphereTriOverlap. The tricollider duplicates this test, so it should be
a bit faster too.

If you're using the vertexstride; could you tell me if it really works as
desired? (Strided indices dont work yet, and strided vertices arent really
tested as well)

Erwin