pfvmSnapshot(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
NAMEpfvmSnapshot - Snapshot module for pfvViewer
FUNCTION SPECIFICATION
#include <Performer/pfvm/pfvmSnapshot.h>
pfvmSnapshot::pfvmSnapshot();
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfvmSnapshot is derived from the parent class
pfvModule, so each of these member functions of class pfvModule are also
directly usable with objects of class pfvmSnapshot. This is also true
for ancestor classes of class pfvModule.
int pfvModule::getScope();
int pfvModule::getScopeIndex();
pfvObject* pfvModule::getScopeTarget();
int pfvModule::autoScope( int*scopeIndex );
void pfvModule::bindCallback(int which);
void pfvModule::unbindCallback(int which);
int pfvModule::getCBMask();
virtual void pfvModule::preConfig();
virtual void pfvModule::postConfig();
virtual void pfvModule::enterView(pfvView*v);
virtual void pfvModule::exitView(pfvView*v);
virtual void pfvModule::enterWorld();
virtual void pfvModule::exitWorld();
virtual void pfvModule::sync();
virtual void pfvModule::frame();
virtual void pfvModule::preCull(pfvDispChan*chan);
virtual void pfvModule::postCull(pfvDispChan*chan);
virtual void pfvModule::preDraw(pfvDispChan*chan);
virtual void pfvModule::postDraw(pfvDispChan*chan);
virtual void pfvModule::overlay(pfvDispChan*chan);
int pfvModule::bindKeys(char*keys);
int pfvModule::unbindKeys(char*keys)
char* pfvModule::getEventMask()
void pfvModule::setEventMask(char* str);
virtual int pfvModule::handleEvent(int evType, char key);
uint64_t pfvModule::getViewMask();
Since the class pfvModule is itself derived from the parent class
pfvobject, objects of class pfvmSnapshot can also be used with these
functions designed for objects of class pfvobject.
virtual int pfvObject::parseXml(pfvXmlNode*xml);
virtual int pfvObject::setXmlField(pfvXmlNode*xml);
char* pfvObject::getName();
void pfvObject::setName(char*_name);
Page 1
pfvmSnapshot(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
Since the class pfvobject is itself derived from the parent class
pfObject, objects of class pfvmSnapshot can also be used with these
functions designed for objects of class pfObject.
void* pfObject::operator new(size_t);
void* pfObject::operator new(size_t, pfFluxMemory *fmem);
void pfObject::setUserData(void *data);
void pfObject::setUserData(int slot, void *data);
void* pfObject::getUserData(pfObject *obj);
void* pfObject::getUserData(pfObject *obj, int slot);
int pfObject::getNumUserData();
Since the class pfObject is itself derived from the parent class
pfMemory, objects of class pfvmSnapshot can also be used with these
functions designed for objects of class pfMemory.
void* pfMemory::getData(const void *ptr);
pfType * pfMemory::getType();
int pfMemory::isOfType(pfType *type);
int pfMemory::isExactType(pfType *type);
const char * pfMemory::getTypeName();
int pfMemory::copy(pfMemory *src);
int pfMemory::compare(const pfMemory *mem);
void pfMemory::print(uint which, uint verbose, char *prefix,
FILE *file);
int pfMemory::getArena(void *ptr);
void* pfMemory::getArena();
int pfMemory::ref();
int pfMemory::unref();
int pfMemory::unrefDelete();
int pfMemory::unrefGetRef();
int pfMemory::getRef();
int pfMemory::checkDelete();
int pfMemory::isFluxed();
void * pfMemory::getArena();
int pfMemory::getSize();
DESCRIPTIONpfvmSnapshot is a pfvViewer module that allows user to save screen
captures in response to key presses.
========
XML tags
========
Page 2
pfvmSnapshot(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
<module>
<class>pfvmSnapshot</class>
<data>
...
parameters
...
</data>
</module>
where parameters is one or more of the following:
<BaseName>string</BaseName> where string is the basename of the file(s)
to be written. The default is "snap".
<NumDigits>int</NumDigits> where int indicates the minimum number of
digits that should make up the numerical part of filenames. The default
value is 2, which when appended to the default basename, generates the
following filenames: snap01.rgb, snap02.rgb ..., snap10.rgb etc.
<SingleChan>bool</SingleChan> where bool is 1 or 0. If it is 1, it means
to only save a snapshot of the channel on which the key was pressed. The
default is 0 which will save a snapshot of the entire pipewindow over
which the key was pressed.
<SaveAlpha>bool</SaveAlpha> where bool is 1 or 0. The default is 0,
which means not to save alpha information.
<key>string</key> where string is the key that will trigger the snapshot.
See man page for pfvInputMngr::getKeyName() and pfvinput.h for a complete
list of keys and associated strings. The default key is F12.
Consecutive images will be saved with a filename of the format
basename%d.rgb[a], where %d is the index of the saved image.
<module>
<class>pfvmSnapshot</class>
<data>
<basename>snapshot</basename>
<singlechan>0</singlechan>
<savealpha>1</saveslpha>
<key>s</key>
</data>
</module>
Page 3
pfvmSnapshot(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
=======
Scoping
=======
A pfvmSnapshot module can be scoped globally, to a single view, or to a
single world.
If scoped globally, pfvmSnapshot module will respond to keypresses over
all pipewindows, and save snapshots of whatever channel (or pwin) key was
pressed over.
If scoped to a view, pfvmSnapshot module will only respond to keypresses
over channels belonging to its target view.
If scoped to a world, pfvmSnapshot module will respond to keypresses over
any view which is currently viewing module's target world.
NOTES
The source code for the pfvmSnapshot Module is provided and can be found
in /usr/share/Performer/src/pguide/libpfv/viewer/modules/pfvmSnapshot
For examples of pfvViewer XML configuration files, look at the sample
.pfv files in /usr/share/Performer/config.
SEE ALSO
pfvModule, pfvViewer, pfvXml
Page 4