From: Don Burns (don_burns@peru)
Date: 05/12/2000 15:49:51
> ok.  let's say, for example, that i need to modify the color LUT dynamcally
> from the computational process.  is there a straightforward approach to
> get the LUT parameters into the Performer node, so that this can be applied
> to the OGLVolumizer?
So, for whatever reason, we subclassed pfVolume as a pfGroup.  I would have
preferred it to be a pfGeode, but for some compelling reason, which I don't
remember, we subclassed it as a pfGroup.  You'll need to add the following
method to the pfVolume class in pfVolume.h:
        pfGeode *getGeode( void ) { return geode; }
You'll then need to create a pfColortable and add it to each of the geosets in
the geode:
    pfColortable *ctable = new pfColortable;
    pfGeode *geode = vol->getGeode();
    for( int i = 0; i < geode->getNumGSets(); i++ )
    {
        pfGeoSet *gset = geode->getGSet( i );
        pfGeoState *gstate = gset->getGState();
        gstate->setMode( PFSTATE_ENCOLORTABLE, PF_ON );
        gstate->setAttr( PFSTATE_COLORTABLE, ctable );
    }
You may then manipulate the pfColortable in any process you wish.
 is there a straightforward way to get any number of
> variable data parameters from the computational process to OGLVolumizer in
> the Performer node?
Do you actually mean COMPUTE? or APP?  Either way, recall that pfVolume.C is
provided as sample source code for implementing a volume in Performer.  You'll
need to alter the source code to get what you want.  I assume you want to make
calls like:
    voAppearanceActions::getBestParameters( ... )
etc.  These could be exposed in the pfVolume class API, somehow I suppose.
 Dave, any thoughts on implementing this?
-don
Caveats.  Remember that the Volumizer data is initialized and manipulated in
the APP process, which does not have a graphics context.  The results of
This archive was generated by hypermail 2b29 : Fri May 12 2000 - 17:55:26 PDT