pfvmDrawStyle(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
NAMEpfvmDrawStyle - DrawStyle module for pfvViewer
FUNCTION SPECIFICATION
#include <Performer/pfvm/pfvmDrawStyle.h>
pfvmDrawStyle::pfvmDrawStyle( pfvXmlNode* xml=NULL);
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfvmDrawStyle is derived from the parent class
pfvModule, so each of these member functions of class pfvModule are also
directly usable with objects of class pfvmDrawStyle. 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 pfvmDrawStyle 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
pfvmDrawStyle(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 pfvmDrawStyle 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 pfvmDrawStyle 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();
DESCRIPTIONpfvmDrawStyle is a pfvViewer module that allows user to change the
drawstyle with keypress.
========
XML tags
========
Page 2
pfvmDrawStyle(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
<module>
<class>pfvmDrawStyle</class>
<data>
...
parameters
...
</data>
</module>
where parameters is one or more of the following:
<name>string</name> where string is the name assigned to the module.
<texture>value</texture> where value is either on or off. If set to
'off', textures are initially disabled. By default it is enabled.
Texturing can be toggled with the 't' key.
<backface>value</backface> where value is either on or off. If set to
'on', backface culling is initially enabled. By default it is disabled.
Backface culling can be toggled with the 'b' key.
<lighting>value</lighting> where value is either on or off. If set to
'off', lighting is initally disabled. By default it is enabled.
Lighting can be toggled with the 'l' key.
<drawstyle>int</drawstyle> where int is an integer indicating the
drawstyle. See the PFUSTYLE* values defined in pfutil.h. The default is
0, which corresponds to filled. When the 'w' key is pressed, it toggles
between wireframe and filled. When the 'W' key is pressed, it cycles
through the available drawstyles.
Example:
<module>
<class>pfvmDrawStyle</class>
<data>
<name>drawing_styles</name>
<lighting>on</lighting>
<backface>on</backface>
<texture>off</texture>
<!-- set drawstyle to wireframe ->
<drawstyle>1</drawstyle>
</data>
</module>
Page 3
pfvmDrawStyle(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
=======
Scoping
=======
A pfvmDrawStyle module can be scoped globally, to a single view, or to a
single world.
If scoped globally, pfvmDrawStyle will respond to all key presses, and
will simoultaneously control the drawstyle of all views in pfvViewer
application.
If scoped to a view, pfvmDrawStyle will only respond to key presses over
its target-view, and will only control the drawstyle of geometry rendered
within such view.
If scoped to a world, pfvmDrawStyle will respond to keypresses on any
view while it is viewing module's target world, and will simoultaneously
control the drawing style for all views currently viewing target world.
NOTES
The source code for the pfvmDrawStyle Module is provided and can be found
in /usr/share/Performer/src/pguide/libpfv/viewer/modules/pfvmDrawStyle
For examples of pfvViewer XML configuration files, look at the sample
.pfv files in /usr/share/Performer/config.
SEE ALSO
pfuPreDrawStyle, pfuPostDrawStyle, pfvModule, pfvViewer, pfvXml
Page 4