I thought that the second batch of errors was because I was setting the
csIntersect::TriangleTriangle(tri[3]
but it was because I was trying to assign values to a const after it was
initialized!
Here is the code that runs correctly. I am still unsure whether to pass in a
true or false boolean at the end to emulate Math3::FindIntersection
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=false;
// return csMath3::FindIntersection (tri1, tri2, line);
//TRY TRUE TOO IF FUNC DOESN'T WORK
return a.TriangleTriangle(tri1,tri2,line,tf);
//return true;
}
Jim Sager <[EMAIL PROTECTED]> wrote: Error:
apps/tutorial/simpmap/simpmap.cpp:118: error: no matching function for call to
csIntersect3::TriangleTriangle(const csVector3 (*)[3], const csVector3 (*)[3],
csSegment3&, bool&)
./include/csgeom/math3d.h:676: note: static bool
csIntersect3::TriangleTriangle(const csVector3*, const csVector3*, csSegment3&,
bool&)
Notice how the implementation takes only csVector3* when I am passing in
csVector3*[3] ?
>From the API:
static bool TriangleTriangle (const csVector3 tri1[3], const csVector3 tri2[3],
csSegment3 &isectline, bool &coplanar)
it takes in a tri1[3], but when I pass in tri1[3], I get this error:
apps/tutorial/simpmap/simpmap.cpp:105: error: passing const csVector3 as
this argument of csVector3& csVector3::operator=(const csVector3&) discards
qualifiers
apps/tutorial/simpmap/simpmap.cpp:106: error: passing const csVector3 as
this argument of csVector3& csVector3::operator=(const csVector3&) discards
qualifiers
apps/tutorial/simpmap/simpmap.cpp:107: error: passing const csVector3 as
this argument of csVector3& csVector3::operator=(const csVector3&) discards
qualifiers
Here's my code
bool
Simple::player_FindIntersection (struct csCollisionPair &cd,
csSegment3 line)
{
//const csVector3 tri1;
const csVector3 tri1[3];
tri1[0] = cd.a1;
tri1[1] = cd.b1;
tri1[2] = cd.c1;
const csVector3 tri2[3];
tri2[0] = cd.a2;
tri2[1] = cd.b2;
tri2[2] = cd.c2;
csIntersect3 a;
bool tf;
tf=false;
//The line I am trying to update: return csMath3::FindIntersection (tri1,
tri2, line);
return a.TriangleTriangle(&tri1,&tri2,line,tf);
}
---------------------------------
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on,
when.
-------------------------------------------------------------------------
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]
---------------------------------
Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. -------------------------------------------------------------------------
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]