pfuCollideGnd question

New Message Reply Date view Thread view Subject view Author view

Torres Mario 678-5430 AMSRL-BE-M (mtorres++at++arl.mil)
Fri, 3 Mar 95 15:29:17 MST


   Thank you Sharon for sharing the solutions to the collide with ground
 problem. It works great !
  
    A question along this lines has been asked before but I have not seen
 a reply (or missed it) here. How can one have a vehicle (or any object)
 be dropped/placed ON the ground of the scene? I am currently importing
 various objects into the scene while its being rendered. The problem
 comes in that the objects will sometimes be floating above the ground or
 partly underground. I know that its doing this because I am placing the
 object on the scene at a position relative to the objects center. Can I
 find out the center of the object after bringing it into the scene? The
 center of the bounding sphere or box? I would guess that I need to do a
 collision of the objects bounding box/segments against the ground, but it
 escapes me as to how to go about it? Any hints are appreciated.

   Mario Torres
   ARL
   mtorres++at++arl.mil
  
>
>
> > ->
> > -> I want to get the value from viewpoint to terrain.In my application,
> > -> I tried to use pfuCollideGrnd(&(ViewState->xformer->coord),
> > -> &(ViewState->xformer->grndNode,zpr)
> > -> But I can't compile this code.
> >
> > I think you just want:
> > {
> > pfNode *grndNode = myTerrainNode; /* or just use your entire scene */
> > pfCoord coord;
> > pfVec3 zpr;
> > /* this is assuming you are using xformer - otherwise, set coord
> > * to your current position and HPR.
> > */
> > pfuGetXformerCoord(ViewState->xformer, coord);
> > pfuCollideGrnd(&coord, grndNode, zpr);
> > }
> > src.
> >
> >
> > --
> > -----{-----{---++at++ -----{----{---++at++ -----{----{---++at++ -----{----{---++at++
> > Sharon Rose Clay (Fischler) - Silicon Graphics, Advanced Graphics Dev.
> > src++at++sgi.com (415) 390 - 1002 FAX: (415) 965 - 2658 MS 8U-590
> > -----{-----{---++at++ -----{----{---++at++ -----{----{---++at++ -----{----{---++at++
> >
> >
> >
>
>


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:51:02 PDT

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