Scott McMillan (mcmillan++at++cool.cs.nps.navy.mil)
Tue, 2 May 1995 18:06:59 -0700 (PDT)
My program simulates a bunch of robots that have sensors implemented
with intersection segments to allow the robots to "see" obstacles like
rocks and bushes (flt models) in their path. Every once in a while
the program will almost hang: the rendering updates drop from about 10
updates per second to around 1 update per 10 seconds because the
application load goes sky high.
So far I have been able to determine that one of the manifestations of
the problem is the PFQHIT_POINT information and the position
information of the PFQHIT_XFORM matrix is coming back with NAN's.
Actually the intersection information for all of the robots is
corrupted after this happens. I have pfNotifyLevel(PFNFY_DEBUG) set
but there are no messages and I do check the PFQHIT_POINT and
PFQHIT_XFORM flags to make sure the info is valid as follows:
if (pfSegsIsectNode(G_shared->scene, &segment, hits)) {
long flags;
pfQueryHit(*hits[0], PFQHIT_FLAGS, &flags);
// Make sure point is valid.
if (flags&PFHIT_POINT) {
pfVec3 pnt;
pfQueryHit(*hits[0], PFQHIT_POINT, &pnt);
// if the object is attached via some DCS -- must get Xform
// matrix:
if (flags & PFHIT_XFORM) {
pfMatrix xform;
pfQueryHit(*hits[0], PFQHIT_XFORM, &xform);
pfXformPt3(pnt, pnt, xform);
}
return pnt[PF_Z];
}
etc...
Has anybody else run into this sort of problem? If so, what did you
do to solve it? OR Does anybody know of other things in Performer
(or elsewhere) that could go wrong that would affect intersection
information?
Any advice on how to tackle this problem is appreciated.
scott
-- Scott McMillan, Ph.D. (408) 656-3316 mcmillan++at++cs.nps.navy.mil Dept. of Computer Science/Naval Postgraduate School/Monterey, CA 93943 NEW URL: http://taurus.cs.nps.navy.mil/people/faculty/mcmillan/
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:28 PDT