john goetz (goetzjr++at++gravy3.cs.nps.navy.mil)
Thu, 3 Feb 94 02:23:54 -0800
I create several segments extending from the bottom of the foot pad,
all of which are long enough to always intersect with the ground.
I then call:
pfCylAroundSegs(cyl, segment, nsegs);
and change the parameters of the pfCylinder as follows:
pfSetVec3(cyl->center, foot_data[leg].foot_xyz[2], foot_data[leg].foot_xyz[0],
foot_data[leg].foot_xyz[1]); // conversion from GL coordinates
cyl->halfLength = 3.0f;
cyl->radius = 22.5f;
The halfLength puts the end of the pfCylinder at the bottom of the foot pad.
I then perform the intersection testing:
/* find intersection with terrain */
isect = pfSegsIsectNode(G_dirt, segment, nsegs, PFTRAV_IS_PRIM|
PFTRAV_IS_CULL_BACK|PFTRAV_IS_NORM,
TERRAIN_MASK,
cyl, result, NULL);
hoping that the pfCylinder will tell me when the foot pad touches the ground,
then using the "result" data to contour the foot pad to the ground. When
contact was detected the data was as follows:
ground height 0.50
cyl center 195.424 -109.000 12.585
cyl axis 0.000 0.000 -1.000
cyl radius 22.500
cyl halflength 3.000
The bottom of the pfCylinder should be at 9.585 which should not be intersecting
with the ground yet. Can somebody please explain?
Thank You.
John Goetz
goetzjr++at++cs.nps.navy.mil
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:10 PDT