channel traversal

New Message Reply Date view Thread view Subject view Author view

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();
}


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon May 14 2001 - 04:20:47 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.