Masaki Aono (aono++at++trl.ibm.co.jp)
Tue, 06 Sep 1994 15:01:01 +0900
I have a problem related to pfQueryHit.
Suppose I have a (pfGeoSet *)gset made of indexed triangles.
This gset is associated with a (pfGeode *)geode, which is
in turn defined as a node of a "scene" root.
Suppose a line segment is independently defined under the scene root.
This line segment is used for intersection test with the gset.
After creating the entire scene,
I used "pfSegIsectNode(root,&segset,hits)"
to see if the line segment intersects with the gset.
When it hit the gset, I deleted the gset with
"pfRemoveChild(root,geode)" and then added a new geode
with a new gset by "pfAddChild(root,new_geode)".
Also, I issued pfUnrefDelete(geode) to eradicate the old gset.
Now I've got a problem.
After checking the intersection between the line segment
and the new gset, I issued
pfQueryHit(*hits[0],PFQHIT_PRIM,&prim_id);
and
pfQueryHit(*hits[0],PFQHIT_VERTS,&triangle);
.
Then, I found that both of the returned values are not correct
in the sense that the hit point returned by
pfQueryHit(*hits[0],PFQHIT_POINT,&point);
is not included in the triangle, or in the primitive
pointed to by prim_id.
Please note that both of the returned values are correct
before removing the old gset and adding the new one.
Does anyone encounter the similar problem?
Any suggestions, advice, etc. are welcome.
Regards,
Masaki Aono
Tokyo Research Laboratory
Email: aono++at++trl.ibm.co.jp
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:32 PDT