From: Stephane Jaeger (stephane.jaeger++at++imag.fr)
Date: 05/14/2001 04:20:31
Hi,
I have two separate questions today :
1) I use a pfLightSource in projtex mode in my scene graph, and I d like
one of my node in the graph, not to be illuminated by this source. I
suppose a way of doing that should be to use a node traversal with a pre
and post callback, but what should I enable/disable in my callbacks to
disable the projection of the texture on that node ?
2) I am now talking about a channel traversal callback. I need to
accumulate several renderings of the same scene in the accumulation
buffer (not implemented in the following code). Between each of the
rendering I d like to slightly rotate the view. As I am doing it, the
view doesn t rotate and the angle is not incremented between two
subsequent renderings. Does anyone know how this should be done ?
Thank you by advance,
Stephane
static void MakeFirstPass (pfChannel *channel, void *)
{
pfVec3 xyz,hpr;
// erase framebuffer and draw Earth-Sky model
channel->clear();
//update window size
channel->getPWin()->getSize(&x, &y);
// Draws the scene once
pfDraw();
channel->getView(xyz,hpr);
fprintf(stderr," hpr : %f %f %f
\n",hpr.vec[0],hpr.vec[1],hpr.vec[2]);
//should increment the viewing angle between to subsequent calls
hpr.set(hpr.vec[0],hpr.vec[1],hpr.vec[2]+10);
fprintf(stderr," hpr : %f %f %f
\n",hpr.vec[0],hpr.vec[1],hpr.vec[2]);
channel->setView(xyz,hpr);
channel->clear();
//Draws the scene another time with slightly modified angle
pfDraw();
}
This archive was generated by hypermail 2b29 : Mon May 14 2001 - 04:20:47 PDT