Here is my old code:
int
WalkTest::player_FindIntersection (struct csCollisionPair &cd,
csVector3 line[2])
{
csVector3 tri1[3];
tri1[0] = cd.a1;
tri1[1] = cd.b1;
tri1[2] = cd.c1;
csVector3 tri2[3];
tri2[0] = cd.a2;
tri2[1] = cd.b2;
tri2[2] = cd.c2;
return csMath3::FindIntersection (tri1, tri2, line);
}
It worked, but my new code doesn't work.
Now here is my new code:
bool
Simple::player_FindIntersection (struct csCollisionPair &cd,
csSegment3 line)
{
csVector3 tri10[3];
tri10[0] = cd.a1;
tri10[1] = cd.b1;
tri10[2] = cd.c1;
csVector3 tri20[3];
tri20[0] = cd.a2;
tri20[1] = cd.b2;
tri20[2] = cd.c2;
const csVector3 tri1[3]=tri10;
const csVector3 tri2[3]=tri20;
csIntersect3 a;
bool tf;
tf=true;
return a.TriangleTriangle(tri1,tri2,line,tf);
}
Here is how I called the first function:
csVector3 line[2];
player_FindIntersection (cd, line)
Here is how I call the 2nd function:
csVector3 line[2];
csSegment3 seg1;
player_FindIntersection (cd, seg1)
line[0]=seg1.Start();
line[1]=seg1.End();
Any help is appreciated. My code is almost totally ported. So I'm about done
asking questions on how to port old code to new code. I've learned a lot about
the new CrystalSpace version. I like that we're using something faster than
Rapid for collision detection. And I really like threads.
,Jim
---------------------------------
Shape Yahoo! in your own image. Join our Network Research Panel today!-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]