[ODE] New stuff
David McClurg
dmcclurg at pandemicstudios.com.au
Tue Sep 3 19:30:02 2002
>> - 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?
i made a mistake. this is not a problem.
>> - 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.
not sure i understand what to change. the 4x3 matrix has 12 entries. in dGeomRaySet/Get...
Rotation[3 * 4 + 0] = REAL(0.0); <<-- illegal access
Rotation[3 * 4 + 1] = REAL(0.0); <<-- illegal access
Rotation[3 * 4 + 2] = REAL(0.0); <<-- illegal access
Direction[3] = Rotation[3 * 4 + 2]; <<-- illegal access
> 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)
In Include/dTriList.h...
---
/* Setting data */
void dGeomTriListBuild(dGeomID g, const dcVector3* Vertices, int VertexStide, int VertexCount, const int* Indices, int IndexStride, int indexCount, int TriStride);
/*struct StridedVertex{
dcVector3 Vertex;
// Userdata
};
int VertexStride = sizeof(StridedVertex);
struct StridedTri{
struct StridedIndex{
int Index;
// Userdata
};
StridedIndex Indices[3];
// Userdata
};
int IndexStride = sizeof(StridedIndex);
int TriStride = sizeof(StridedTri);*/
---
Why do you need TriStride? You only need the offset to the next index or vertex. IndexStride and VertexStride are sufficient. Also, since if VertexStride != sizeof(dcVector3) you do a copy to match opcode, it doesn't seem worth using. Do you really need the array copy now that you have callbacks into opcode instead of pointers?
I should also remark that you have two versions of dTriList.h in the zip. one in the Include folder and an old out-of-date one in the main folder for dTriList.
Ta