Re: Problem in Intersection.

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++multipass.engr.sgi.com)
Sat, 18 Oct 1997 00:38:44 -0700


On Oct 17, 9:00pm, VenkataKrishnan Chandran wrote:
> Subject: Problem in Intersection.
> Dear Performer users,
>
> 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.
>

I haven't looked too closely but what speed is the ball falling?
Also make your your vector points in the direction of motion.
It's quite possible you miss the terrain due to discrete sampling.

Cheers,Angus.
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:05 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.