From: Yves GAUVIN (yves.gauvin++at++sncf.fr)
Date: 12/01/2000 05:45:39
Hello,
For intersection testing, I was using segset, but I want to use pfCylinder
to test intersection. Here is a part of my code, when I run this, I ve got
the message :
19373 PF Warning/Usage: pfCylAroundSegs() NULL pfCylinder*.
I guess that my cylinder has a bad definition but I don't see where. I'm
using performer 2.3.1 under Linux.
segset_collision.activeMask = 0x0007;
segset_collision.isectMask = 0xFFFF;
segset_collision.mode = PFTRAV_IS_GSET|PFTRAV_IS_CULL_BACK|PFTRAV_IS_PATH;
/*|PFTRAV_IS_BCYL for later when the definition of the cylinder will work*/
segset_collision.userData = NULL;
segset_collision.discFunc = NULL; /*then I will set it to l_bound_cylinder
when the definition will work*/
for (i = 0; i <3; i++)
{
float l_val;
l_val = 45*(i+1)*M_PI/180;
pfSetVec3 (segset_collision.segs[i].dir,cos (l_val), sin (l_val), -0.5
* (i)); /*-0.5 * (i), the 3 vectors are not in the same plane*/
ComputeAbsPos ((pfNode *) shared -> scene,p_zone -> noeud_collision ,
l_matrix);
pfSetVec3
(segset_collision.segs[i].pos,l_matrix[3][0],l_matrix[3][1],l_matrix[3][2]+1
.5f);
segset_collision.segs[i].length = 2.0f;
}
pfCylinder *l_bound_cylinder;
pfCylAroundSegs (l_bound_cylinder, (const pfSeg **)
&segset_collision.segs, 3);
Please Help
Cheers
Yves GAUVIN
FRENCH RAILROAD.
This archive was generated by hypermail 2b29 : Fri Dec 01 2000 - 05:43:03 PST