pfiInputXform(3pf) OpenGL Performer 3.2.2 libpfui Reference Pages
NAME
pfiNewIXform, pfiNewInputCoord, pfiNewMotionCoord, pfiNewInput,
pfiGetIXformClassType, pfiGetInputClassType, pfiGetInputCoordClassType,
pfiGetMotionCoordClassType, pfiIsIXformInMotion, pfiInputName,
pfiIsIXGetName, pfiInputFocus, pfiGetInputFocus, pfiInputEventMask,
pfiGetInputEventMask, pfiInputEventStreamCollector,
pfiGetInputEventStreamCollector, pfiInputEventStreamProcessor,
pfiGetInputEventStreamProcessor, pfiInputEventHandler,
pfiGetInputEventHandler, pfiIXformMat, pfiGetIXformMat, pfiIXformInput,
pfiGetIXformInput, pfiIXformInputCoordPtr, pfiGetIXformInputCoordPtr,
pfiIXformMotionCoord, pfiGetIXformMotionCoord, pfiIXformResetCoord,
pfiGetIXformResetCoord, pfiIXformCoord, pfiGetIXformCoord,
pfiIXformStartMotion, pfiGetIXformStartMotion, pfiIXformMotionLimits,
pfiGetIXformMotionLimits, pfiIXformDBLimits, pfiGetIXformDBLimits,
pfiIXformBSphere, pfiGetIXformBSphere, pfiIXformUpdateFunc,
pfiGetIXformUpdateFunc, pfiIXformMotionFuncs, pfiGetIXformMotionFuncs,
pfiResetInput, pfiCollectInputEvents, pfiProcessInputEvents,
pfiStopIXform, pfiResetIXform, pfiUpdateIXform, pfiResetIXformPosition,
pfiHaveFastMouseClick - pfiInputXform functions.
FUNCTION SPECIFICATION
#include <Performer/pfui.h>
pfiInputXform * pfiNewIXform(void *arena);
pfiInputCoord * pfiNewInputCoord(void *arena);
pfiMotionCoord * pfiNewMotionCoord(void *arena);
pfiInput * pfiNewInput(void *arena);
pfType * pfiGetIXformClassType(void);
pfType * pfiGetInputClassType(void);
pfType * pfiGetInputCoordClassType(void);
pfType * pfiGetMotionCoordClassType(void);
int pfiIsIXformInMotion(pfiInputXform *ix);
void pfiInputName(pfiInput *in, const char *name);
const char * pfiIsIXGetName(pfiInput *in);
void pfiInputFocus(pfiInput *in, int focus);
int pfiGetInputFocus(pfiInput *in);
void pfiInputEventMask(pfiInput *in, int emask);
Page 1
pfiInputXform(3pf) OpenGL Performer 3.2.2 libpfui Reference Pages
int pfiGetInputEventMask(pfiInput *in);
void pfiInputEventStreamCollector(pfiInput *in,
pfiEventStreamHandlerType func, void *data);
void pfiGetInputEventStreamCollector(pfiInput *in,
pfuEventHandlerFuncType *func, void **data);
void pfiInputEventStreamProcessor(pfiInput *in,
pfiEventStreamHandlerType func, void *data);
void pfiGetInputEventStreamProcessor(pfiInput *in,
pfuEventHandlerFuncType *func, void **data);
void pfiInputEventHandler(pfiInput *in,
pfuEventHandlerFuncType func, void *data);
void pfiGetInputEventHandler(pfiInput *in,
pfuEventHandlerFuncType *func void **data);
void pfiIXformMat(pfiInputXform *ix, PFMATRIX mat);
void pfiGetIXformMat(pfiInputXform *ix, PFMATRIX mat);
void pfiIXformInput(pfiInputXform *ix, pfiInput *in);
pfiInput * pfiGetIXformInput(pfiInputXform *ix);
void pfiIXformInputCoordPtr(pfiInputXform *ix,
pfiInputCoord *icoord);
pfiInputCoord * pfiGetIXformInputCoordPtr(pfiInputXform *ix);
void pfiIXformMotionCoord(pfiInputXform *ix,
pfiMotionCoord *xcoord);
void pfiGetIXformMotionCoord(pfiInputXform *ix,
pfiMotionCoord *xcoord);
void pfiIXformResetCoord(pfiInputXform *ix,
pfCoord *resetPos);
void pfiGetIXformResetCoord(pfiInputXform *ix,
pfCoord *resetPos);
void pfiIXformCoord(pfiInputXform *ix, pfCoord *coord);
void pfiGetIXformCoord(pfiInputXform *ix, pfCoord *coord);
void pfiIXformStartMotion(pfiInputXform *ix,
float startSpeed, float startAccel);
Page 2
pfiInputXform(3pf) OpenGL Performer 3.2.2 libpfui Reference Pages
void pfiGetIXformStartMotion(pfiInputXform *ix,
float *startSpeed, float *startAccel);
void pfiIXformMotionLimits(pfiInputXform *ix,
float maxSpeed, float angularVel, float maxAccel);
void pfiGetIXformMotionLimits(pfiInputXform *ix,
float *maxSpeed, float *angularVel,
float *maxAccel);
void pfiIXformDBLimits(pfiInputXform *ix, pfBox *dbLimits);
void pfiGetIXformDBLimits(pfiInputXform *ix,
pfBox *dbLimits);
void pfiIXformBSphere(pfiInputXform *ix, pfSphere *sphere);
void pfiGetIXformBSphere(pfiInputXform *ix,
pfSphere *sphere);
void pfiIXformUpdateFunc(pfiInputXform *ix,
pfiInputXformUpdateFuncType func, void *data);
void pfiGetIXformUpdateFunc(pfiInputXform *ix,
pfiInputXformUpdateFuncType *func, void **data);
void pfiIXformMotionFuncs(pfiInputXform *ix,
pfiInputXformFuncType start,
pfiInputXformFuncType stop, void *data);
void pfiGetIXformMotionFuncs(pfiInputXform *ix,
pfiInputXformFuncType *start,
pfiInputXformFuncType *stop, void **data);
void pfiResetInput(pfiInput *in);
void pfiCollectInputEvents(pfiInput *in);
void pfiProcessInputEvents(pfiInput *in);
void pfiStopIXform(pfiInputXform *ix);
void pfiResetIXform(pfiInputXform *ix);
void pfiUpdateIXform(pfiInputXform *ix);
void pfiResetIXformPosition(pfiInputXform *ix);
int pfiHaveFastMouseClick(pfuMouse *mouse, int button,
float msecs);
Page 3
pfiInputXform(3pf) OpenGL Performer 3.2.2 libpfui Reference Pages
typedef int (*pfiEventStreamHandlerType)(pfiInput *, pfuEventStream *);
typedef int (*pfiInputXformFuncType)(pfiInputXform *, void *);
typedef int (*pfiInputXformUpdateFuncType)(pfiInputXform *, pfiInputCoord *, void *);
DESCRIPTION
pfiInputXform is a basic facility for tying together routines to get and
process user input, invoke a model for computing transformations based on
that input, and applying those transformations to the viewing position or
transformation matrix to be applied to a database.
The pfiInputXform has a complete C++ API following the conventions of
general OpenGL Performer C++ API; C++ methods are declared in
/usr/include/Performer/pfui/pfiInputXform.h.
pfiInit should be called once before any pfiInputXform routines and
before the forked creation of any additional processes that will be
calling pfiInputXform routines.
pfiGetIXformClassType returns the pfType* for the class pfiXformer.
Because OpenGL Performer allows subclassing of built-in types, when
decisions are made based on the type of an object, it is usually better
to use pfIsOfType to test if an object is of a type derived from a
Performer type rather than to test for strict equality of the pfType*'s.
pfiNewIXform creates a new pfiInputXform data structure as described
above and returns a pointer to that structure. arena should specify the
shared arena handle returned by pfGetSharedArena or from the process
dynamic memory area.
pfiIXformInput makes in the pfiInput of the pfiInputXform ix. A pfiInput
structure make be created with pfiNewInput. By default, a pfiInputXform
has a NULL pfiInput*. pfiGetIXformInput will return the pfiInput* of the
pfiInputXform ix.
pfiIXformInputCoordPtr makes icoord the pfiInputCoord of the
pfiInputXform ix. A pfiInput structure make be created with
pfiNewInputCoord. By default, a pfiInputXform has a NULL pfiInputCoord*.
pfiGetIXformInputCoordPtr will return the pfiInputCoord* of the
pfiInputXform ix.
pfiIXformMotionCoord will copy the contents of mcoord to the
pfiMotionCoord of ix. A pfiMotionCoord structure make be created with
pfiNewMotionCoord. A pfiInputXform has a fixed pfiMotionCoord structure.
pfiIXformMat sets the current transformation matrix of ix to be mat.
This will also cause the current position of ix to be recomputed.
pfiGetIXformMat will return the current transformation matrix of ix.
pfiIXformCoord sets the current position (XYZ and HPR) of ix to be coord.
This will also cause the current transformation matrix of ix to be
Page 4
pfiInputXform(3pf) OpenGL Performer 3.2.2 libpfui Reference Pages
recomputed. pfiGetIXformCoord will return the current position pfCoord
of ix.
pfiIXformResetCoord specifies the position that ix should reset to upon a
call to pfiResetIXformPosition. pfiGetIXformResetCoord will return the
current reset position. This position is by default xyz=(0.0, 0.0, 0.0)
and hpr=(0.0, 0.0, 0.0).
pfiIXformDBLimits will set the database bounding box of ix to be
dbLimits. A bounding sphere and database center (if not previously set
with pfiIXformBSphere) will be automatically recalculated. The default
bounding box is of size PFI_BIGDB and is centered at (0.0, 0.0, 0.0).
pfiGetIXformDBLimits will return the current bounding box of ix in
dblimits. The database size, center, and limits are often used in
setting and constraining the speed and position of motion models.
pfiIXformBSphere will fix a bounding sphere sphere for ix.
pfiGetIXformBSphere will return the current bounding sphere.
pfiIXformStartMotion specifies the starting speed and acceleration to be
used by ix when starting motion. These parameters may be queried with
pfiGetIXformStartMotion.
pfiIXformMotionLimits specifies the maximum speed, angular velocity, and
acceleration for ix. These parameters may be queried with
pfiGetIXformMotionLimits.
pfiHaveFastMouseClick will determine if a mouse button button of mouse
was clicked for less than msecs.
pfiIXformUpdateFunc specifies the callback function and associated data
that will be called upon a call to pfiUpdateIXform on ix.
pfiGetIXformUpdateFunc will return the update callback function pointer
and associated data. By default, the update callback function is NULL.
pfiInputEventStreamCollector sets the callback function and associated
data for the collection of events for the event stream of the pfiInput
in. This routine will be called upon a call to pfiCollectInputEvents on
in. pfiGetInputEventStreamCollector will return the current callback
function and data.
pfiInputEventStreamProcessor sets the callback function and associated
data for processing of the events stored in the event stream of the
pfiInput in. This routine will be called upon a call to
pfiProcessInputEvents on in. pfiGetInputEventStreamProcessor will return
the current callback function and data.
pfiIXformMode sets the specified mode of ix to have value val.
pfiGetIXformMode returns the value of specified mode of ix.
pfiInputXform modes and corresponding values are:
Page 5
pfiInputXform(3pf) OpenGL Performer 3.2.2 libpfui Reference Pages
PFIX_MODE_MOTION
sets the basic motion mode for the motion model.
PFIX_MOTION_STOP is the basic motion mode that all
pfiInputXforms must understand.
PFIX_MODE_MOTION_MOD
sets a bitmask of special motion modifiers. A bitmask of
0x0 implies that motion does not undergo any special
modifications beyond that expected by the current motion
mode.
PFIX_MODE_ACCEL
sets the current acceleration mode for ix.
PFIX_ACCEL_NONE is the basic acceleration mode that all
pfiInputXforms must understand.
PFIX_MODE_AUTO
sets the automatic motion condition val.
PFIX_MODE_LIMIT_POS
sets a bitmask indicating the types of position limits
that should be enforced by ix. The bitmask val may
contain one or more of PFIX_LIMIT_POS_HORIZ,
PFIX_LIMIT_POS_BOTTOM, and PFIX_LIMIT_POS_TOP. A value of
PFIX_LIMIT_POS_NONE will prohibit limits on position.
PFIX_MODE_LIMIT_SPEED
sets a bitmask indicating what types of speed limits that
ix should enforce. The bitmask val may contain one or
more of PFIX_LIMIT_SPEED_MAX and PFIX_LIMIT_SPEED_DB. A
value of PFIX_LIMIT_SPEED_NONE will prohibit limits on
speed.
PFIX_MODE_LIMIT_ACCEL
sets a bitmask indicating what types of speed limits that
ix should enforce. The bitmask val may contain one or
more of PFIX_LIMIT_ACCEL_MAX and PFIX_LIMIT_ACCEL_DB. A
value of PFIX_LIMIT_ACCEL_NONE will prohibit limits on
acceleration.
pfiStopIXform halts motion of ix by setting the current speed and
acceleration to zero.
pfiResetIXform resets the motion and positional parameters to their
initial values.
pfiResetIXformPosition sets current position of ix to be the current
reset position, which can be set with pfiIXformResetCoord.
pfiUpdateIXform copies the current position of the pfiMotionCoord of ix
to the stored previous position of the pfiMotionCoord and calls the
current update callback function with its associated data.
Page 6
pfiInputXform(3pf) OpenGL Performer 3.2.2 libpfui Reference Pages
NOTES
The libpfui source code, object code and documentation are provided as
unsupported software. Routines are subject to change in future releases.
Page 7