PfWidget class.
More...
#include </home/werner/origo/vish/modules/pf/PfWidget.h>
List of all members.
Classes
Public Slots
- void setFrameTime (int t)
- Set frame timer in milliseconds.
- void setNearFar (float neardist, float fardist)
- Set near/far clipping planes.
- void setView (float azim, float elev, float dist=0.0f)
- Set viewer position by azimuth/elevation/distance angles.
- void setViewAll ()
- View entire scene.
Signals
-
void nearFarChanged (float neardist, float fardist)
- Near/far has changed.
-
void viewPosChanged (float x, float y, float z)
- View position has changed.
-
void viewRotChanged (float h, float p, float r)
- View orientation has changed.
Public Member Functions
-
pfChannel * getChannel () const
- Get channel.
-
int getPipeNum () const
- Get pipe number.
-
pfPipeWindow * getPipeWindow () const
- Get pipe window.
-
pfScene * getScene () const
- Get scene.
- PfWidget (QWidget *parent=NULL, const char *name="PfWidget")
- Constructor.
- void setChannel (pfChannel *chan)
- Set channel.
- void setPipeNum (int pipeNum)
- Set pipe number.
- void setPipeWindow (pfPipeWindow *pipeWin)
- Set pipe window.
- void setScene (pfScene *scene)
- Set scene.
-
void setView (pfVec3 &xyz, pfVec3 &hpr)
- Set viewer position/orientation.
-
virtual ~PfWidget ()
- Destructor.
Public Attributes
Protected Member Functions
-
virtual void initializeGL ()
- Initialize pipe window, channel, scene.
-
virtual void mouseMoveEvent (QMouseEvent *)
- Mouse move.
-
virtual void mousePressEvent (QMouseEvent *)
- Mouse press.
-
virtual void paintGL ()
- Not used since drawing is done via update(), drawFunc(), paintPF().
-
virtual void paintPF (pfChannel *chan)
- Performer draw method.
-
virtual void resizeGL (int, int)
- Resize window.
-
virtual void timerEvent (QTimerEvent *)
- Trigger Performer drawing.
Detailed Description
PfWidget class.
Wraps Performer calls in a Qt widget so it can be used in Qt user interfaces. Note that this probably does not give the best performance possible since it's triggered from the Qt event loop.
Constructor & Destructor Documentation
PfWidget::PfWidget |
( |
QWidget * |
parent = NULL , |
|
|
const char * |
name = "PfWidget" |
|
) |
| |
Constructor.
Calls pfInit if not already initialized.
Member Function Documentation
void PfWidget::setChannel |
( |
pfChannel * |
chan | ) |
|
Set channel.
- Parameters:
-
chan | pfChannel to use. This cannot be changed after the window is opened. |
void PfWidget::setFrameTime |
( |
int |
t | ) |
[slot] |
Set frame timer in milliseconds.
- Parameters:
-
t | Update rate in milliseconds. This parameter determines how often the scene is redrawn. |
void PfWidget::setNearFar |
( |
float |
neardist, |
|
|
float |
fardist |
|
) |
| [slot] |
Set near/far clipping planes.
- Parameters:
-
near | Near clipping plane. |
far | Far clipping plane. |
void PfWidget::setPipeNum |
( |
int |
pipeNum | ) |
|
Set pipe number.
- Parameters:
-
pipeNum | Pipe number to open the window on. This cannot be changed after the window is opened. |
void PfWidget::setPipeWindow |
( |
pfPipeWindow * |
pipeWin | ) |
|
Set pipe window.
- Parameters:
-
pipeWin | pfPipeWindow to use. This cannot be changed after the window is opened. |
void PfWidget::setScene |
( |
pfScene * |
scene | ) |
|
Set scene.
If none is given before it is needed a default scene with a single light will be created.
- Parameters:
-
scene | pfScene to use. This can be changed after the window is opened :-) |
void PfWidget::setView |
( |
float |
azim, |
|
|
float |
elev, |
|
|
float |
dist = 0.0f |
|
) |
| [slot] |
Set viewer position by azimuth/elevation/distance angles.
- Parameters:
-
azim | Azimuth angle in degrees, where 0=N, 90=E, 180=S, 270=W. |
elev | Height angle in degrees. |
dist | Distance from center. If this is =< 0.0 then the radius of the scene's bounding sphere is used instead. |
void PfWidget::setViewAll |
( |
| ) |
[slot] |
View entire scene.
This function positions the camera to view the entire scene.
The documentation for this class was generated from the following files:
- modules/pf/PfWidget.h
- modules/pf/PfWidget.cpp