VenkataKrishnan Chandran (venkatakrishnanc++at++hotmail.com)
Fri, 17 Oct 1997 21:00:08 PDT
Sub: Problem in Intersection.
I have two Objects in one of our simulation software, a
Spherical body which is in its own DCS and a Terrain
which is placed in SCS. I am trying to get a point on the
Terrain where the Spherical body from certain height,
falls and intersects with it (the terrain).
To get this point, this is what I have done:
1. Created a line segment attached to the Spherical
-body to sense the intersection with Terrain.
2. Code Synopsis :
ball_segset.activeMask = 0x01;
ball_segset.isectMask = 0x02;
ball_segset.mode = PFTRAV_IS_PRIM | PFTRAV_IS_NORMS;
pfSetVec3(ball_segset.segs[0].pos,0.0f,ball_y,ball_z);
pfSetVec3(ball_segset.segs[0].dir,0.0f,0.0f,-1.0f);
ball_segset.segs[0].length = 40.0f;
isect_ball = pfSegsIsectNode(group,&ball_segset,hit);
if(isect_ball)
{
pfVec3 pnt;
pfQueryHit(*hit[0],PFQHIT_POINT,&pnt);
ball_y = pnt[PF_Y];
ball_z = pnt[PF_Z];
}
3.Observation :
The Intersection is happening only when the length
of the isect segment is more than 25.0 (ball_segset.segs[0].
length). If the isect segment length is less than 25.0,
intersection is not happening. What could be the reason?
My interest is at a smaller segment length. Kindly, help
me in this regard.
Thanks in advance,
Venkat.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:05 PDT