pfvDispChan(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
NAME
pfvDispChan, getHPROffset - Configure one or more channels through an XML
file or API calls.
FUNCTION SPECIFICATION
#include <Performer/pfv/pfvDisplay.h>
virtual int pfvDispChan::config();
pfChannel* pfvDispChan::getHandle();
pfvDispPWin* pfvDispChan::getPWin();
pfvDispView* pfvDispChan::getView();
virtual void pfvDispChan::setFullWindow(int flag);
int pfvDispChan::getFullWindow();
virtual void pfvDispChan::setViewport(float l, float r, float b,
float t);
void pfvDispChan::getViewport(float* l, float* r, float* b,
float* t);
virtual void pfvDispChan::setFOV(float x, float y);
virtual void pfvDispChan::setFOV(float l, float r, float b, float t);
virtual void pfvDispChan::setOrtho(float l, float r, float b, float t);
virtual int pfvDispChan::getFOV(float* x, float* y);
virtual int pfvDispChan::getFOV(float* l, float* r, float* b,
float* t);
virtual int pfvDispChan::getOrtho(float* l, float* r, float* b,
float* t);
void pfvDispChan::setAutoAspect(int which );
int pfvDispChan::getAutoAspect();
int pfvDispChan::getFrustType();
virtual void pfvDispChan::setXYZOffset(float x, float y, float z);
void pfvDispChan::getXYZOffset(float*x, float*y, float*z);
virtual void pfvDispChan::setHPROffset(float h, float p, float r);
Page 1
pfvDispChan(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
void getHPROffset(float*h, float*p, float*r);
void pfvDispChan::setViewRange(float l, float r, float b,
float t);
void pfvDispChan::getViewRange(float* l, float* r, float* b,
float* t);
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfvDispChan is derived from the parent class
pfvObject, so each of these member functions of class pfvObject are also
directly usable with objects of class pfvDispChan. This is also true for
ancestor classes of class pfvObject.
virtual int pfvObject::parseXml(pfvXmlNode*xml);
virtual int pfvObject::setXmlField(pfvXmlNode*xml);
char* pfvObject::getName();
void pfvObject::setName(char*_name);
Since the class pfvObject is itself derived from the parent class
pfObject, objects of class pfvDispChan 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 pfvDispChan 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();
Page 2
pfvDispChan(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
int pfMemory::unrefDelete();
int pfMemory::unrefGetRef();
int pfMemory::getRef();
int pfMemory::checkDelete();
int pfMemory::isFluxed();
void * pfMemory::getArena();
int pfMemory::getSize();
DESCRIPTION
The pfvDispChan class is a libpfv wrapper for the libpf pfChannel class.
It allows a channel to be configured through an XML file or through API
calls. A pfvDispChan cannot be instantiated directly, instead, it has to
be created through the pfvDispPWin::createChan function. All pfvDispChan
objects should be created before calling pfvDisplayMngr::preConfig.
pfvDispChan::config is where the libpf pfChannel object associated with
the pfvDispChan is created and configured. After creating the pfChannel,
pfvDispChan::config will add it to the pfPipeWindow associated with the
parent pfvDispPWin, will add the token PFCHAN_FOV to pfChannel's share-
mask (see man page for pfChannel::setShare), set pfChannel's viewport,
frustum, initial view position, default Near and Far values, xyz and hpr
view offsets.
pfvDispChan::getHandle returns a handle to the pfChannel object
associated with pfvDispChan. This must be called after
pfvDispChan::config or the return value will be NULL.
pfvDispChan::getPWin returns a handle to the parent pfvDispPWin for this
pfvDispChan.
pfvDispChan::getView returns a handle to the pfvDispView to which this
pfvDispChan belongs. If this pfvDispChan has not yet been assigned to any
view, this method will return NULL. Note that if a pfvDispChan is not
assigned to any view, the pfvDisplayMngr::preConfig method will
automatically assign it to view0 (the first view in Display Manager's
global view-list).
pfvDispChan::setFullWindow specifies whether this channel should fill its
entire window. Set flag to a non-zero value to indicate full screen, or
zero otherwise.
pfvDispChan::getFullWindow returns one if this pfvDispChan fills its
whole window or zero othewise.
pfvDispChan::setViewport specifies the portion of parent pfvDispPWin over
which channel will be rendered (refer to the pfChannel::setViewport man
page).
pfvDispChan::getViewport returns viewport values as set by
pfvDispChan::setViewport.
The arguments to pfvDispChan::setFOV(float x, float y) specify total
Page 3
pfvDispChan(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
horizontal and vertical fields of view (FOV) in degrees. See the
pfChannel::setFOV man page for a description.
pfvDispChan::setFOV(float l, float r, float b, float t) may be used to
set up an asymmetric frustum. See the pfChannel::makePersp man page.
pfvDispChan::setOrtho sets up an orthogonal frustum. See the
pfChannel::makeOrtho man page.
pfvDispChan::getFOV(float* x, float* y) returns the current horizontal
and vertical FOV values on channel. If the frustum is asymmetric, the
resulting values will be approximations.
pfvDispChan::getFOV(float* l, float* r, float* b, float* t) returns the
current FOV values on channel. This function can be used for both
symmetric and asymmetric frusta.
pfvDispChan::getOrtho may be used to retreive current orthogonal frustum
settings on a channel.
pfvDispChan::setAutoAspect is used to specify which FOV extent to
automatically match to the aspect ratio of the pfChannel's viewport.
Refer to the pfChannel::setAutoAspect man page.
pfvDispChan::getAutoAspect returns the current value for channel's auto
aspect setting.
pfvDispChan::getFrustType will return one of: PFFRUST_ORTHOGONAL,
PFFRUST_SIMPLE or PFFRUST_PERSPECTIVE depending on channel's current
frustum type. See the man page for pfChannel::getFrustType for a
description.
pfvDispChan::setXYZOffset sets a translational offset for this channel.
Offset values are relative to the eye position set on the pfvDispView to
which this channel belongs. See the man page for
pfChannel::setViewOffsets for a description.
pfvDispChan::getXYZOffset returns the translational offset for this
channel as was specified by a call to pfvDispChan::setXYZOffset.
pfvDispChan::setHPROffset sets a rotational offset for this channel.
Offset values are relative to eye position set on the pfvDispView to
which the channel belongs. See man page for pfChannel::setViewOffsets
for a description.
pfvDispChan::getHPROffset returns the rotational offset for this channel,
as specified by a call to pfvDispChan::setHPROffset.
pfvDispChan::setViewRange is used to map channel 2d viewport to a
rectangular region in view-space. By default, each channel's view range
is initialized to the unit space x:0-1,y:0-1. However, when multiple
channels are joined in a view object, it may be useful to set up each
Page 4
pfvDispChan(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
channel's view range to cover a different region in view-space. Some
examples of uses of this feature are: the pfvInputManager computing
view-normalized mouse coordinates which allow mouse motion to
transparently be tracked over multiple channels and pfvDispPWins and the
orthogonal frustum setup by the pfvViewer, when dispatching Overlay
callbacks, allowing overlay imagery to be rendered over multiple
channels, pipes and pwins as if they were a single surface.
pfvDispChan::getViewRange returns the four values determining the
rectangular region in view-space covered by the channel.
XML FILE CONFIGURATION
A pfDispChan object can be fully configured using an xml tag by passing
an XmlNode to pfvDispPipe::createChan. If a <chan> tag is found inside a
pipe tag <pipe> the pipe will automatically create a new pwin by parsing
<chan> tag.
The list of valid tags inside <chan> is:
<name> a string that should uniquely identify pwin
<fullwin> a boolean, specifying whether this channel should fill
its entire window
<viewport> four comma-separated floats, specifying channel's
viewport
<viewrange> four comma-separated floats, specifying the mapping of
the channel 2d viewport to a rectangular region in
view-space
<fov> two or four comma-separated floats specifying channel's
field of view. 4 values may be specified to set up an
asymetric frustum.
<ortho> four comma-separated floats,.specifying an orthogonal
frustum
<xyzOffset> three comma-separated floats, specifying translational
offset for this channel
<hprOffset> three comma-separated floats, specifying rotational
offset for this channel
NOTES
Near and Far values cannot yet be set on a pfvDispChan, but may be be set
directly on the pfChannel handle anytime after pfvDispChan::config.
Page 5
pfvDispChan(3pf) OpenGL Performer 3.2.2 libpfv C++ Reference Pages
SEE ALSO
pfvXml, pfvDisplayMngr, pfvViewer, pfvDispPWin, pfvDispView, pfChannel
Page 6