![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
OpenGL viewer widget. More...
#include <FXGLViewer.h>
Public Types | |
| enum | { PARALLEL, PERSPECTIVE } |
| enum | { ID_PERSPECTIVE = FXGLCanvas::ID_LAST, ID_PARALLEL, ID_FRONT, ID_BACK, ID_LEFT, ID_RIGHT, ID_TOP, ID_BOTTOM, ID_RESETVIEW, ID_FITVIEW, ID_TOP_COLOR, ID_BOTTOM_COLOR, ID_BACK_COLOR, ID_AMBIENT_COLOR, ID_LIGHT_AMBIENT, ID_LIGHT_DIFFUSE, ID_LIGHT_SPECULAR, ID_LIGHTING, ID_TURBO, ID_FOG, ID_DITHER, ID_SCALE_X, ID_SCALE_Y, ID_SCALE_Z, ID_DIAL_X, ID_DIAL_Y, ID_DIAL_Z, ID_ROLL, ID_PITCH, ID_YAW, ID_FOV, ID_ZOOM, ID_CUT_SEL, ID_COPY_SEL, ID_PASTE_SEL, ID_DELETE_SEL, ID_PRINT_IMAGE, ID_PRINT_VECTOR, ID_LASSO_ZOOM, ID_LASSO_SELECT, ID_LAST } |
Public Member Functions | |
| long | onPaint (FXObject *, FXSelector, void *) |
| long | onEnter (FXObject *, FXSelector, void *) |
| long | onLeave (FXObject *, FXSelector, void *) |
| long | onMotion (FXObject *, FXSelector, void *) |
| long | onMouseWheel (FXObject *, FXSelector, void *) |
| long | onChanged (FXObject *, FXSelector, void *) |
| long | onPick (FXObject *, FXSelector, void *) |
| long | onClicked (FXObject *, FXSelector, void *) |
| long | onDoubleClicked (FXObject *, FXSelector, void *) |
| long | onTripleClicked (FXObject *, FXSelector, void *) |
| long | onLassoed (FXObject *, FXSelector, void *) |
| long | onSelected (FXObject *, FXSelector, void *) |
| long | onDeselected (FXObject *, FXSelector, void *) |
| long | onInserted (FXObject *, FXSelector, void *) |
| long | onDeleted (FXObject *, FXSelector, void *) |
| long | onLeftBtnPress (FXObject *, FXSelector, void *) |
| long | onLeftBtnRelease (FXObject *, FXSelector, void *) |
| long | onMiddleBtnPress (FXObject *, FXSelector, void *) |
| long | onMiddleBtnRelease (FXObject *, FXSelector, void *) |
| long | onRightBtnPress (FXObject *, FXSelector, void *) |
| long | onRightBtnRelease (FXObject *, FXSelector, void *) |
| long | onSpaceBallMotion (FXObject *, FXSelector, void *) |
| long | onUngrabbed (FXObject *, FXSelector, void *) |
| long | onKeyPress (FXObject *, FXSelector, void *) |
| long | onKeyRelease (FXObject *, FXSelector, void *) |
| long | onFocusIn (FXObject *, FXSelector, void *) |
| long | onFocusOut (FXObject *, FXSelector, void *) |
| long | onClipboardLost (FXObject *, FXSelector, void *) |
| long | onClipboardGained (FXObject *, FXSelector, void *) |
| long | onClipboardRequest (FXObject *, FXSelector, void *) |
| long | onCmdPerspective (FXObject *, FXSelector, void *) |
| long | onUpdPerspective (FXObject *, FXSelector, void *) |
| long | onCmdParallel (FXObject *, FXSelector, void *) |
| long | onUpdParallel (FXObject *, FXSelector, void *) |
| long | onCmdFront (FXObject *, FXSelector, void *) |
| long | onUpdFront (FXObject *, FXSelector, void *) |
| long | onCmdBack (FXObject *, FXSelector, void *) |
| long | onUpdBack (FXObject *, FXSelector, void *) |
| long | onCmdLeft (FXObject *, FXSelector, void *) |
| long | onUpdLeft (FXObject *, FXSelector, void *) |
| long | onCmdRight (FXObject *, FXSelector, void *) |
| long | onUpdRight (FXObject *, FXSelector, void *) |
| long | onCmdTop (FXObject *, FXSelector, void *) |
| long | onUpdTop (FXObject *, FXSelector, void *) |
| long | onCmdBottom (FXObject *, FXSelector, void *) |
| long | onUpdBottom (FXObject *, FXSelector, void *) |
| long | onCmdResetView (FXObject *, FXSelector, void *) |
| long | onCmdFitView (FXObject *, FXSelector, void *) |
| long | onDNDEnter (FXObject *, FXSelector, void *) |
| long | onDNDLeave (FXObject *, FXSelector, void *) |
| long | onDNDMotion (FXObject *, FXSelector, void *) |
| long | onDNDDrop (FXObject *, FXSelector, void *) |
| long | onTipTimer (FXObject *, FXSelector, void *) |
| long | onCmdXYZDial (FXObject *, FXSelector, void *) |
| long | onUpdXYZDial (FXObject *, FXSelector, void *) |
| long | onCmdRollPitchYaw (FXObject *, FXSelector, void *) |
| long | onUpdRollPitchYaw (FXObject *, FXSelector, void *) |
| long | onCmdXYZScale (FXObject *, FXSelector, void *) |
| long | onUpdXYZScale (FXObject *, FXSelector, void *) |
| long | onUpdCurrent (FXObject *, FXSelector, void *) |
| long | onCmdCutSel (FXObject *, FXSelector, void *) |
| long | onCmdCopySel (FXObject *, FXSelector, void *) |
| long | onCmdPasteSel (FXObject *, FXSelector, void *) |
| long | onCmdDeleteSel (FXObject *, FXSelector, void *) |
| long | onUpdDeleteSel (FXObject *, FXSelector, void *) |
| long | onCmdBackColor (FXObject *, FXSelector, void *) |
| long | onUpdBackColor (FXObject *, FXSelector, void *) |
| long | onCmdGradientBackColor (FXObject *, FXSelector, void *) |
| long | onUpdGradientBackColor (FXObject *, FXSelector, void *) |
| long | onCmdAmbientColor (FXObject *, FXSelector, void *) |
| long | onUpdAmbientColor (FXObject *, FXSelector, void *) |
| long | onCmdLighting (FXObject *, FXSelector, void *) |
| long | onUpdLighting (FXObject *, FXSelector, void *) |
| long | onCmdFog (FXObject *, FXSelector, void *) |
| long | onUpdFog (FXObject *, FXSelector, void *) |
| long | onCmdDither (FXObject *, FXSelector, void *) |
| long | onUpdDither (FXObject *, FXSelector, void *) |
| long | onCmdFov (FXObject *, FXSelector, void *) |
| long | onUpdFov (FXObject *, FXSelector, void *) |
| long | onCmdZoom (FXObject *, FXSelector, void *) |
| long | onUpdZoom (FXObject *, FXSelector, void *) |
| long | onCmdLightAmbient (FXObject *, FXSelector, void *) |
| long | onUpdLightAmbient (FXObject *, FXSelector, void *) |
| long | onCmdLightDiffuse (FXObject *, FXSelector, void *) |
| long | onUpdLightDiffuse (FXObject *, FXSelector, void *) |
| long | onCmdLightSpecular (FXObject *, FXSelector, void *) |
| long | onUpdLightSpecular (FXObject *, FXSelector, void *) |
| long | onCmdTurbo (FXObject *, FXSelector, void *) |
| long | onUpdTurbo (FXObject *, FXSelector, void *) |
| long | onCmdPrintImage (FXObject *, FXSelector, void *) |
| long | onCmdPrintVector (FXObject *, FXSelector, void *) |
| long | onCmdLassoZoom (FXObject *, FXSelector, void *) |
| long | onCmdLassoSelect (FXObject *, FXSelector, void *) |
| long | onQueryHelp (FXObject *, FXSelector, void *) |
| long | onQueryTip (FXObject *, FXSelector, void *) |
| virtual long | onDefault (FXObject *, FXSelector, void *) |
| Called for unhandled messages. | |
| FXGLViewer (FXComposite *p, FXGLVisual *vis, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0) | |
| Construct GL viewer widget. | |
| FXGLViewer (FXComposite *p, FXGLVisual *vis, FXGLCanvas *share, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0) | |
| Construct GL viewer widget sharing display lists with another GL canvas. | |
| FXGLViewer (FXComposite *p, FXGLContext *ctx, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0) | |
| Construct GL viewer widget sharing context. | |
| virtual void | create () |
| Create all of the server-side resources for this window. | |
| virtual void | detach () |
| Detach server-side resources. | |
| virtual void | layout () |
| Perform layout. | |
| FXdouble | worldPix () const |
| Return size of pixel in world coordinates. | |
| FXdouble | modelPix () const |
| Return size of pixel in model coordinates. | |
| FXGLObject ** | lasso (FXint x1, FXint y1, FXint x2, FXint y2) |
| Return a NULL-terminated list of all objects in the given rectangle, or NULL. | |
| virtual FXGLObject ** | select (FXint x, FXint y, FXint w, FXint h) |
| Return a NULL-terminated list of all objects in the given rectangle, or NULL. | |
| virtual FXGLObject * | pick (FXint x, FXint y) |
| Perform a pick operation, returning the object at the given x,y position, or NULL. | |
| virtual FXbool | setBounds (const FXRangef &box) |
| Change the model bounding box; this adjusts the viewer. | |
| FXbool | fitToBounds (const FXRangef &box) |
| Fit viewer to the given bounding box. | |
| void | getViewport (FXViewport &v) const |
| Return the viewer's viewport. | |
| void | eyeToScreen (FXint &sx, FXint &sy, FXVec3f e) |
| Translate eye-coordinate to screen coordinate. | |
| FXVec3f | screenToEye (FXint sx, FXint sy, FXfloat eyez=0.0) |
| Translate screen coordinate to eye coordinate at the given depth. | |
| FXVec3f | screenToTarget (FXint sx, FXint sy) |
| Translate screen coordinate to eye coordinate at the target point depth. | |
| FXVec3f | worldToEye (FXVec3f w) |
| Translate world coordinate to eye coordinate. | |
| FXfloat | worldToEyeZ (FXVec3f w) |
| Translate world coordinate to eye coordinate depth. | |
| FXVec3f | eyeToWorld (FXVec3f e) |
| Translate eye coordinate to eye coordinate. | |
| FXVec3f | worldVector (FXint fx, FXint fy, FXint tx, FXint ty) |
| Calculate world coordinate vector from screen movement. | |
| void | setMaterial (const FXMaterial &mtl) |
| Change default object material setting. | |
| void | getMaterial (FXMaterial &mtl) const |
| Return default object material setting. | |
| void | setFieldOfView (FXdouble fv) |
| Change camera field of view angle (in degrees) | |
| FXdouble | getFieldOfView () const |
| Return camera field of view angle. | |
| void | setZoom (FXdouble zm) |
| Change camera zoom factor. | |
| FXdouble | getZoom () const |
| Return camera zoom factor. | |
| void | setDistance (FXdouble ed) |
| Change target point distance. | |
| FXdouble | getDistance () const |
| Return target point distance. | |
| void | setScale (FXVec3f s) |
| Change unequal model scaling factors. | |
| const FXVec3f & | getScale () const |
| Return current scaling factors. | |
| void | setOrientation (FXQuatf rot) |
| Change camera orientation from quaternion. | |
| const FXQuatf & | getOrientation () const |
| Return current camera orientation quaternion. | |
| void | setCenter (FXVec3f cntr) |
| Change object center (tranlation) | |
| const FXVec3f & | getCenter () const |
| Return object center. | |
| void | translate (FXVec3f vec) |
| Translate object center. | |
| FXbool | getBoreVector (FXint sx, FXint sy, FXVec3f &point, FXVec3f &dir) |
| Return boresight vector. | |
| FXVec3f | getEyeVector () const |
| Return eyesight vector. | |
| FXVec3f | getEyePosition () const |
| Return eye position. | |
| void | setHelpText (const FXString &text) |
| Change help text. | |
| const FXString & | getHelpText () const |
| Return help text. | |
| void | setTipText (const FXString &text) |
| Change tip text. | |
| const FXString & | getTipText () const |
| Return tip text. | |
| const FXMat4f & | getTransform () const |
| Return the current transformation matrix. | |
| const FXMat4f & | getInvTransform () const |
| Return the inverse of the current transformation matrix. | |
| void | setScene (FXGLObject *sc) |
| Change the scene, i.e. the object being displayed. | |
| FXGLObject * | getScene () const |
| Return the current scene object. | |
| void | setSelection (FXGLObject *sel) |
| Change selection. | |
| FXGLObject * | getSelection () const |
| Return selection. | |
| void | setProjection (FXuint proj) |
| Change the projection mode, PERSPECTIVE or PARALLEL. | |
| FXuint | getProjection () const |
| Return the projection mode. | |
| void | setBackgroundColor (const FXVec4f &clr) |
| Change both top and bottom background colors. | |
| void | setBackgroundColor (const FXVec4f &clr, FXbool bottom) |
| Change top or bottom background color. | |
| const FXVec4f & | getBackgroundColor (FXbool bottom) const |
| Return top or bottom window background color. | |
| void | setAmbientColor (const FXVec4f &clr) |
| Change global ambient light color. | |
| const FXVec4f & | getAmbientColor () const |
| Return global ambient light color. | |
| FXbool | readPixels (FXColor *&buffer, FXint x, FXint y, FXint w, FXint h) |
| Read the pixels off the screen as array of FXColor; this array can be directly passed to fxsaveBMP and other image output routines. | |
| FXbool | readFeedback (FXfloat *&buffer, FXint &used, FXint &size, FXint x, FXint y, FXint w, FXint h) |
| Read the feedback buffer containing the current scene, returning used and allocated size. | |
| void | setZSortFunc (FXZSortFunc func) |
| Change hidden-surface feedback buffer sorting algorithm. | |
| FXZSortFunc | getZSortFunc () const |
| Return hidden surface sorting function. | |
| void | setMaxHits (FXint maxh) |
| Change the maximum hits, i.e. | |
| FXint | getMaxHits () const |
| Return maximum pickbuffer size. | |
| FXbool | doesTurbo () const |
| When drawing a GL object, if doesTurbo() is true, the object may choose to perform a reduced complexity drawing as the user is interactively manipulating; another update will be done later when the full complexity drawing can be performed again. | |
| FXbool | getTurboMode () const |
| Return turbo mode setting. | |
| void | setTurboMode (FXbool turbo=true) |
| Set turbo mode. | |
| void | getLight (FXLight &lite) const |
| Return light source settings. | |
| void | setLight (const FXLight &lite) |
| Change light source settings. | |
| virtual void | save (FXStream &store) const |
| Save viewer to a stream. | |
| virtual void | load (FXStream &store) |
| Load viewer from a stream. | |
| virtual | ~FXGLViewer () |
| Destructor. | |
Static Public Attributes | |
| static FXDragType | objectType |
| static const FXchar | objectTypeName [] |
Protected Types | |
| enum | { HOVERING, PICKING, ROTATING, POSTING, TRANSLATING, ZOOMING, FOVING, DRAGGING, TRUCKING, GYRATING, DO_LASSOSELECT, LASSOSELECT, DO_LASSOZOOM, LASSOZOOM } |
Protected Member Functions | |
| void | glsetup () |
| virtual void | updateProjection () |
| virtual void | updateTransform () |
| FXVec3f | spherePoint (FXint px, FXint py) |
| FXQuatf | turn (FXint fx, FXint fy, FXint tx, FXint ty) |
| void | drawWorld (FXViewport &wv) |
| void | drawAnti (FXViewport &wv) |
| void | drawLasso (FXint x0, FXint y0, FXint x1, FXint y1) |
| FXint | selectHits (FXuint *&hits, FXint &nhits, FXint x, FXint y, FXint w, FXint h) |
| FXint | renderFeedback (FXfloat *buffer, FXint x, FXint y, FXint w, FXint h, FXint maxbuffer) |
| void | drawFeedback (FXDCPrint &pdc, const FXfloat *buffer, FXint used) |
| virtual FXGLObject * | processHits (FXuint *pickbuffer, FXint nhits) |
| void | setOp (FXuint o) |
Protected Attributes | |
| FXViewport | wvt |
| FXMat4f | transform |
| FXMat4f | itransform |
| FXuint | projection |
| FXQuatf | rotation |
| FXdouble | fov |
| FXdouble | zoom |
| FXVec3f | center |
| FXVec3f | scale |
| FXdouble | worldpx |
| FXdouble | modelpx |
| FXint | maxhits |
| FXdouble | ax |
| FXdouble | ay |
| FXdouble | diameter |
| FXdouble | distance |
| FXVec4f | background [2] |
| FXVec4f | ambient |
| FXLight | light |
| FXMaterial | material |
| FXint | dial [3] |
| FXString | help |
| FXString | tip |
| FXGLObject * | dropped |
| FXGLObject * | selection |
| FXZSortFunc | zsortfunc |
| FXGLObject * | scene |
| FXbool | doesturbo |
| FXbool | turbomode |
| FXuchar | mode |
Friends | |
| class | FXGLObject |
OpenGL viewer widget.
| void FX::FXGLViewer::setMaxHits | ( | FXint | maxh | ) | [inline] |
Change the maximum hits, i.e.
the maximum size of the pick buffer. When set to less than or equal to zero, picking is essentially turned off.
| void FX::FXGLViewer::setZSortFunc | ( | FXZSortFunc | func | ) | [inline] |
Change hidden-surface feedback buffer sorting algorithm.
This can be used for move/draw printed output depth sorting.
|
|