From: GAUVIN Yves (yves.gauvin++at++sncf.fr)
Date: 08/25/2000 03:39:12
Hello,
It's effectively what I thought but I had a problem with this solution :
I don't know how to stop the pfNodeTravFuncs (where I get my matrix) and
I need this matrix only on request.
Simon has send a solution (thanks again) but it works without problems
only when there is no instance in the scene.
Here's my functions :
int
TraversFunc(pfTraverser *p_trav,void *userData)
{
pfNode *l_node = (pfNode*)pfGetTravNode(p_trav);
pfMatrix l_mat;
pfGetTravMat (p_trav, l_mat);
printf ("\n%f %f %f %f\n %f %f %f %f\n %f %f %f %f\n %f %f %f %f\n",
l_mat[0][0],l_mat[0][1],l_mat[0][2],l_mat[0][3],
l_mat[1][0],l_mat[1][1],l_mat[1][2],l_mat[1][3],
l_mat[2][0],l_mat[2][1],l_mat[2][2],l_mat[2][3],
l_mat[3][0],l_mat[3][1],l_mat[3][2],l_mat[3][3]);
// this is exactly the matrix I need :)
return PFTRAV_CONT;
}
void
SO_server_utils_compute_matrix_path (pfNode *p_node)
{
pfNodeTravFuncs(p_node, PFTRAV_APP, PendulumFunc, NULL);
}
I call
SO_server_utils_compute_matrix_path (node1);
on a client request.
Now I get the matrix every frame and I don't know how to stop the
TraversFunc.
Somebody could help?
Yves GAUVIn
French RAILROADS.
Sylvain Mayer a écrit :
>
> In the app callback of any given node, you can get the matrix of the
> pfTraverser, which is the full matrix of the object you installed the app
> callback on.
>
> regards, Sylvain
> ________________________________________
> Sylvain Mayer, 3D Graphics Developer
> Scene Graph Manager
> Visual Systems Engineering
> CAE Electronics (http://www.cae.ca)
> mailto:mayer++at++cae.ca
> Tel: (514) 341-6780 Ext.: 3065
> Fax: (514) 340-5539
>
> *** For the latest Vis-Sim related info check out:
> http://www.vis-sim.org
>
> > -----Original Message-----
> > From: GAUVIN Yves [mailto:yves.gauvin++at++sncf.fr]
> > Sent: Thursday, August 24, 2000 9:33 AM
> > To: info-performer++at++sgi.com
> > Subject: matrix for a path
> >
> >
> > Hello,
> >
> > I need to place an object in the coordinates of another
> > object. So, I
> > need the complete transformation of the two objects (root to
> > object). Is
> > there a "pfPathGetTransform" function or must I construct it manually?
> >
> >
> > cheers,
> >
> > Yves GAUVIN
> > FRENCH RAILROADS
> > --------------------------------------------------------------
> > ---------
> > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com
> >
This archive was generated by hypermail 2b29 : Fri Aug 25 2000 - 03:41:56 PDT