Mario Veraart (rioj7++at++fel.tno.nl)
Fri, 20 Feb 1998 16:24:54 +0100 (MET)
You are right. I had never read this paragraph.
I think the PFTRAV_IS_NODE is a typo and what they mean is PFTRAV_IS_GEODE.
You must setup a discriminator callback that accepts a pfHit* as
argument. And setup the mode of the pfSegSet to contain
PFTRAV_IS_GEODE and PFTRAV_IS_GSET. You will get a callback for every
bounding sphere and bounding box that is tested. I think you must keep
your own record of what is the last test you did because you haven't
defined a segment.
You can read a bit more in the man page of pfNode and pfGeoSet about
the pfNode::isect() function.
>
> My cylinder is not constructed from pfSegSets, it is from the bounding
> sphere of an object.
>
> If I have to define at lease one pfSeg for the moving cylinder, say
> segs[0],dose the "dir"
> mean the moving direction of the cylinder? and how to define "pos" in
> this case? or they
> are just meaningless?
A cylinder around one sphere always encoses more space than the
sphere. If you want to determine if an object would collide with the
scene in the near future it is a lot more specific to set up the
cylinder yourself and assign it to the pfSegSet::bound member.
>
> One relative question is the Bounding Sphere of a pfDCS. What is the
> coordinate system
> used to express the "center , radius", relative to scene root?
It is with regards to the coordinate system of the parent nodes.
If there is no parent that transforms the coordinate system it is in
scene coordinates.
The cylinder you specify must be in scene coordinates.
Mario
=======================================================================
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:48 PDT