From: daviii (daviii++at++web.de)
Date: 03/26/2004 12:24:09
hello everyone!
i have got a problem, whitch i can not solve:
when i do an intersection test on loaded buildings that are put into my
scene like this:
pfDCS * v6 = new pfDCS();
v6->setTrans(-50.0, 50.0 ,0.0);
v6->setRot(90.0 ,0.0, 0.0);
Shared->readNode = pfdLoadFile("models/Building1a.flt");
v6->addChild(Shared->readNode);
Shared->scene->addChild(v6);
and i ask for the poin of intersection, it tells me, that the intersection
happened somewhere near the origin.
so somehow the intersection happens when i actually see the house, but it
tells me, that the point of intersection was somewhere else.
it is like i woulden`t have called setTrans and setRot...
my intersection test looks like this:
pfSegSet segset;
pfHit **hits[32];
int isect;
segset.activeMask = 1;
segset.isectMask = 0x01;
segset.discFunc = NULL;
segset.mode = PFTRAV_IS_PRIM;
segset.segs[0].pos.set(line.pos[0], line.pos[1], line.pos[2]);
segset.segs[0].dir.set(line.dir[0], line.dir[1], line.dir[2]);
segset.segs[0].length = line.length;
isect = Shared->scene->isect(&segset, hits);
pfVec3 pnt;
(*hits[0])->query(PFQHIT_POINT, pnt.vec);
does anyone know what it is that i do wrong?
thank you very much!
dave
This archive was generated by hypermail 2b29 : Fri Mar 26 2004 - 12:22:13 PST