Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXGLViewer.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                      O p e n G L   V i e w e r   W i d g e t                  *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1997,2010 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (at your option) any later version.                                           *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 ********************************************************************************/
00021 #ifndef FXGLVIEWER_H
00022 #define FXGLVIEWER_H
00023 
00024 #ifndef FXGLCANVAS_H
00025 #include "FXGLCanvas.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00031 class FXDCPrint;
00032 class FXGLObject;
00033 class FXGLVisual;
00034 
00035 
00036 // GL Viewer options
00037 enum {
00038   GLVIEWER_LIGHTING = 0x00010000,    /// Lighting is on
00039   GLVIEWER_FOG      = 0x00020000,    /// Fog mode on
00040   GLVIEWER_DITHER   = 0x00040000     /// Dithering
00041   };
00042 
00043 
00044 /*******************************  Viewer  Structs  *****************************/
00045 
00046 
00047 /// OpenGL Viewer Viewport
00048 struct FXViewport {
00049   FXint      w;                 /// Viewport width
00050   FXint      h;                 /// Viewport height
00051   FXdouble   left;              /// World left
00052   FXdouble   right;             /// World right
00053   FXdouble   bottom;            /// World bottom
00054   FXdouble   top;               /// World top
00055   FXdouble   hither;            /// World hither (near)
00056   FXdouble   yon;               /// World yon (far)
00057   };
00058 
00059 
00060 /// OpenGL Light Source
00061 struct FXAPI FXLight {
00062   FXVec4f    ambient;           /// Ambient light color
00063   FXVec4f    diffuse;           /// Diffuse light color
00064   FXVec4f    specular;          /// Specular light color
00065   FXVec4f    position;          /// Light position
00066   FXVec3f    direction;         /// Spot direction
00067   FXfloat    exponent;          /// Spotlight exponent
00068   FXfloat    cutoff;            /// Spotlight cutoff angle
00069   FXfloat    c_attn;            /// Constant attenuation factor
00070   FXfloat    l_attn;            /// Linear attenuation factor
00071   FXfloat    q_attn;            /// Quadratic attenuation factor
00072   };
00073 
00074 
00075 /// OpenGL Material Description
00076 struct FXAPI FXMaterial {
00077   FXVec4f    ambient;           /// Ambient material color
00078   FXVec4f    diffuse;           /// Diffuse material color
00079   FXVec4f    specular;          /// Specular material color
00080   FXVec4f    emission;          /// Emissive material color
00081   FXfloat    shininess;         /// Specular shininess
00082   };
00083 
00084 
00085 // Feedback buffer sort routine
00086 typedef FXbool (*FXZSortFunc)(FXfloat*& buffer,FXint& used,FXint& size);
00087 
00088 
00089 /********************************  Viewer  Class  ******************************/
00090 
00091 
00092 /// OpenGL viewer widget
00093 class FXAPI FXGLViewer : public FXGLCanvas {
00094   FXDECLARE(FXGLViewer)
00095   friend class FXGLObject;
00096 protected:
00097   FXViewport      wvt;              // Window viewport transform
00098   FXMat4f         transform;        // Current transformation matrix
00099   FXMat4f         itransform;       // Inverse of current transformation matrix
00100   FXuint          projection;       // Projection mode
00101   FXQuatf         rotation;         // Viewer orientation
00102   FXdouble        fov;              // Field of view
00103   FXdouble        zoom;             // Zoom factor
00104   FXVec3f         center;           // Model center
00105   FXVec3f         scale;            // Model scale
00106   FXdouble        worldpx;          // Pixel size in world
00107   FXdouble        modelpx;          // Pixel size in model
00108   FXint           maxhits;          // Maximum number of hits
00109   FXdouble        ax,ay;            // Quick view->world coordinate mapping
00110   FXdouble        diameter;         // Size of model diameter ( always > 0)
00111   FXdouble        distance;         // Distance of PRP to target
00112   FXVec4f         background[2];    // Background colors
00113   FXVec4f         ambient;          // Global ambient light
00114   FXLight         light;            // Light source
00115   FXMaterial      material;         // Base material properties
00116   FXint           dial[3];          // Dial positions
00117   FXString        help;             // Status help
00118   FXString        tip;              // Tooltip for background
00119   FXGLObject     *dropped;          // Object being dropped on
00120   FXGLObject     *selection;        // Current object
00121   FXZSortFunc     zsortfunc;        // Routine to sort feedback buffer
00122   FXGLObject     *scene;            // What we're looking at
00123   FXbool          doesturbo;        // Doing turbo mode
00124   FXbool          turbomode;        // Turbo mode
00125   FXuchar         mode;             // Mode the widget is in
00126 public:
00127 
00128   // Common DND types
00129   static FXDragType objectType;     // GL Object type
00130 
00131 protected:
00132 
00133   // Mouse actions when in viewing window
00134   enum {
00135     HOVERING,                       // Hovering mouse w/o doing anything
00136     PICKING,                        // Pick mode
00137     ROTATING,                       // Rotating camera around target
00138     POSTING,                        // Posting right-mouse menu
00139     TRANSLATING,                    // Translating camera
00140     ZOOMING,                        // Zooming
00141     FOVING,                         // Change field-of-view
00142     DRAGGING,                       // Dragging objects
00143     TRUCKING,                       // Trucking camera
00144     GYRATING,                       // Rotation of camera around eye
00145     DO_LASSOSELECT,                 // Lasso select when mouse pressed
00146     LASSOSELECT,                    // Anchor of lasso rectangle
00147     DO_LASSOZOOM,                   // Zoom when mouse pressed
00148     LASSOZOOM                       // Zoom rectangle
00149     };
00150 
00151 protected:
00152   FXGLViewer();
00153   void glsetup();
00154   virtual void updateProjection();
00155   virtual void updateTransform();
00156   FXVec3f spherePoint(FXint px,FXint py);
00157   FXQuatf turn(FXint fx,FXint fy,FXint tx,FXint ty);
00158   void drawWorld(FXViewport& wv);
00159   void drawAnti(FXViewport& wv);
00160   void drawLasso(FXint x0,FXint y0,FXint x1,FXint y1);
00161   FXint selectHits(FXuint*& hits,FXint& nhits,FXint x,FXint y,FXint w,FXint h);
00162   FXint renderFeedback(FXfloat *buffer,FXint x,FXint y,FXint w,FXint h,FXint maxbuffer);
00163   void drawFeedback(FXDCPrint& pdc,const FXfloat* buffer,FXint used);
00164   virtual FXGLObject* processHits(FXuint *pickbuffer,FXint nhits);
00165   void setOp(FXuint o);
00166 private:
00167   FXGLViewer(const FXGLViewer&);
00168   FXGLViewer &operator=(const FXGLViewer&);
00169   void initialize();
00170 public:
00171 
00172   // Events
00173   long onPaint(FXObject*,FXSelector,void*);
00174   long onEnter(FXObject*,FXSelector,void*);
00175   long onLeave(FXObject*,FXSelector,void*);
00176   long onMotion(FXObject*,FXSelector,void*);
00177   long onMouseWheel(FXObject*,FXSelector,void*);
00178   long onChanged(FXObject*,FXSelector,void*);
00179   long onPick(FXObject*,FXSelector,void*);
00180   long onClicked(FXObject*,FXSelector,void*);
00181   long onDoubleClicked(FXObject*,FXSelector,void*);
00182   long onTripleClicked(FXObject*,FXSelector,void*);
00183   long onLassoed(FXObject*,FXSelector,void*);
00184   long onSelected(FXObject*,FXSelector,void*);
00185   long onDeselected(FXObject*,FXSelector,void*);
00186   long onInserted(FXObject*,FXSelector,void*);
00187   long onDeleted(FXObject*,FXSelector,void*);
00188   long onLeftBtnPress(FXObject*,FXSelector,void*);
00189   long onLeftBtnRelease(FXObject*,FXSelector,void*);
00190   long onMiddleBtnPress(FXObject*,FXSelector,void*);
00191   long onMiddleBtnRelease(FXObject*,FXSelector,void*);
00192   long onRightBtnPress(FXObject*,FXSelector,void*);
00193   long onRightBtnRelease(FXObject*,FXSelector,void*);
00194   long onSpaceBallMotion(FXObject*,FXSelector,void*);
00195   long onUngrabbed(FXObject*,FXSelector,void*);
00196   long onKeyPress(FXObject*,FXSelector,void*);
00197   long onKeyRelease(FXObject*,FXSelector,void*);
00198   long onFocusIn(FXObject*,FXSelector,void*);
00199   long onFocusOut(FXObject*,FXSelector,void*);
00200   long onClipboardLost(FXObject*,FXSelector,void*);
00201   long onClipboardGained(FXObject*,FXSelector,void*);
00202   long onClipboardRequest(FXObject*,FXSelector,void*);
00203 
00204   // Commands
00205   long onCmdPerspective(FXObject*,FXSelector,void*);
00206   long onUpdPerspective(FXObject*,FXSelector,void*);
00207   long onCmdParallel(FXObject*,FXSelector,void*);
00208   long onUpdParallel(FXObject*,FXSelector,void*);
00209   long onCmdFront(FXObject*,FXSelector,void*);
00210   long onUpdFront(FXObject*,FXSelector,void*);
00211   long onCmdBack(FXObject*,FXSelector,void*);
00212   long onUpdBack(FXObject*,FXSelector,void*);
00213   long onCmdLeft(FXObject*,FXSelector,void*);
00214   long onUpdLeft(FXObject*,FXSelector,void*);
00215   long onCmdRight(FXObject*,FXSelector,void*);
00216   long onUpdRight(FXObject*,FXSelector,void*);
00217   long onCmdTop(FXObject*,FXSelector,void*);
00218   long onUpdTop(FXObject*,FXSelector,void*);
00219   long onCmdBottom(FXObject*,FXSelector,void*);
00220   long onUpdBottom(FXObject*,FXSelector,void*);
00221   long onCmdResetView(FXObject*,FXSelector,void*);
00222   long onCmdFitView(FXObject*,FXSelector,void*);
00223   long onDNDEnter(FXObject*,FXSelector,void*);
00224   long onDNDLeave(FXObject*,FXSelector,void*);
00225   long onDNDMotion(FXObject*,FXSelector,void*);
00226   long onDNDDrop(FXObject*,FXSelector,void*);
00227   long onTipTimer(FXObject*,FXSelector,void*);
00228   long onCmdXYZDial(FXObject*,FXSelector,void*);
00229   long onUpdXYZDial(FXObject*,FXSelector,void*);
00230   long onCmdRollPitchYaw(FXObject*,FXSelector,void*);
00231   long onUpdRollPitchYaw(FXObject*,FXSelector,void*);
00232   long onCmdXYZScale(FXObject*,FXSelector,void*);
00233   long onUpdXYZScale(FXObject*,FXSelector,void*);
00234   long onUpdCurrent(FXObject*,FXSelector,void*);
00235   long onCmdCutSel(FXObject*,FXSelector,void*);
00236   long onCmdCopySel(FXObject*,FXSelector,void*);
00237   long onCmdPasteSel(FXObject*,FXSelector,void*);
00238   long onCmdDeleteSel(FXObject*,FXSelector,void*);
00239   long onUpdDeleteSel(FXObject*,FXSelector,void*);
00240   long onCmdBackColor(FXObject*,FXSelector,void*);
00241   long onUpdBackColor(FXObject*,FXSelector,void*);
00242   long onCmdGradientBackColor(FXObject*,FXSelector,void*);
00243   long onUpdGradientBackColor(FXObject*,FXSelector,void*);
00244   long onCmdAmbientColor(FXObject*,FXSelector,void*);
00245   long onUpdAmbientColor(FXObject*,FXSelector,void*);
00246   long onCmdLighting(FXObject*,FXSelector,void*);
00247   long onUpdLighting(FXObject*,FXSelector,void*);
00248   long onCmdFog(FXObject*,FXSelector,void*);
00249   long onUpdFog(FXObject*,FXSelector,void*);
00250   long onCmdDither(FXObject*,FXSelector,void*);
00251   long onUpdDither(FXObject*,FXSelector,void*);
00252   long onCmdFov(FXObject*,FXSelector,void*);
00253   long onUpdFov(FXObject*,FXSelector,void*);
00254   long onCmdZoom(FXObject*,FXSelector,void*);
00255   long onUpdZoom(FXObject*,FXSelector,void*);
00256   long onCmdLightAmbient(FXObject*,FXSelector,void*);
00257   long onUpdLightAmbient(FXObject*,FXSelector,void*);
00258   long onCmdLightDiffuse(FXObject*,FXSelector,void*);
00259   long onUpdLightDiffuse(FXObject*,FXSelector,void*);
00260   long onCmdLightSpecular(FXObject*,FXSelector,void*);
00261   long onUpdLightSpecular(FXObject*,FXSelector,void*);
00262   long onCmdTurbo(FXObject*,FXSelector,void*);
00263   long onUpdTurbo(FXObject*,FXSelector,void*);
00264   long onCmdPrintImage(FXObject*,FXSelector,void*);
00265   long onCmdPrintVector(FXObject*,FXSelector,void*);
00266   long onCmdLassoZoom(FXObject*,FXSelector,void*);
00267   long onCmdLassoSelect(FXObject*,FXSelector,void*);
00268   long onQueryHelp(FXObject*,FXSelector,void*);
00269   long onQueryTip(FXObject*,FXSelector,void*);
00270   virtual long onDefault(FXObject*,FXSelector,void*);
00271 
00272 public:
00273 
00274   // Projection modes
00275   enum {
00276     PARALLEL,     // Parallel projection
00277     PERSPECTIVE     // Perspective projection
00278     };
00279 
00280   // Messages
00281   enum {
00282     ID_PERSPECTIVE=FXGLCanvas::ID_LAST,
00283     ID_PARALLEL,
00284     ID_FRONT,
00285     ID_BACK,
00286     ID_LEFT,
00287     ID_RIGHT,
00288     ID_TOP,
00289     ID_BOTTOM,
00290     ID_RESETVIEW,
00291     ID_FITVIEW,
00292     ID_TOP_COLOR,
00293     ID_BOTTOM_COLOR,
00294     ID_BACK_COLOR,
00295     ID_AMBIENT_COLOR,
00296     ID_LIGHT_AMBIENT,
00297     ID_LIGHT_DIFFUSE,
00298     ID_LIGHT_SPECULAR,
00299     ID_LIGHTING,
00300     ID_TURBO,
00301     ID_FOG,
00302     ID_DITHER,
00303     ID_SCALE_X,
00304     ID_SCALE_Y,
00305     ID_SCALE_Z,
00306     ID_DIAL_X,
00307     ID_DIAL_Y,
00308     ID_DIAL_Z,
00309     ID_ROLL,
00310     ID_PITCH,
00311     ID_YAW,
00312     ID_FOV,
00313     ID_ZOOM,
00314     ID_CUT_SEL,
00315     ID_COPY_SEL,
00316     ID_PASTE_SEL,
00317     ID_DELETE_SEL,
00318     ID_PRINT_IMAGE,
00319     ID_PRINT_VECTOR,
00320     ID_LASSO_ZOOM,
00321     ID_LASSO_SELECT,
00322     ID_LAST
00323     };
00324 
00325 public:
00326 
00327   // Common DND type names
00328   static const FXchar objectTypeName[];
00329 
00330 public:
00331 
00332   /// Construct GL viewer widget
00333   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);
00334 
00335   /// Construct GL viewer widget sharing display lists with another GL canvas
00336   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);
00337 
00338   /// Construct GL viewer widget sharing context
00339   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);
00340 
00341   /// Create all of the server-side resources for this window
00342   virtual void create();
00343 
00344   /// Detach server-side resources
00345   virtual void detach();
00346 
00347   /// Perform layout
00348   virtual void layout();
00349 
00350   /// Return size of pixel in world coordinates
00351   FXdouble worldPix() const { return worldpx; }
00352 
00353   /// Return size of pixel in model coordinates
00354   FXdouble modelPix() const { return modelpx; }
00355 
00356   /// Return a NULL-terminated list of all objects in the given rectangle, or NULL
00357   FXGLObject** lasso(FXint x1,FXint y1,FXint x2,FXint y2);
00358 
00359   /// Return a NULL-terminated list of all objects in the given rectangle, or NULL
00360   virtual FXGLObject** select(FXint x,FXint y,FXint w,FXint h);
00361 
00362   /// Perform a pick operation, returning the object at the given x,y position, or NULL
00363   virtual FXGLObject* pick(FXint x,FXint y);
00364 
00365   /// Change the model bounding box; this adjusts the viewer
00366   virtual FXbool setBounds(const FXRangef& box);
00367 
00368   /// Fit viewer to the given bounding box
00369   FXbool fitToBounds(const FXRangef& box);
00370 
00371   /// Return the viewer's viewport
00372   void getViewport(FXViewport& v) const;
00373 
00374   /// Translate eye-coordinate to screen coordinate
00375   void eyeToScreen(FXint& sx,FXint& sy,FXVec3f e);
00376 
00377   /// Translate screen coordinate to eye coordinate at the given depth
00378   FXVec3f screenToEye(FXint sx,FXint sy,FXfloat eyez=0.0);
00379 
00380   /// Translate screen coordinate to eye coordinate at the target point depth
00381   FXVec3f screenToTarget(FXint sx,FXint sy);
00382 
00383   /// Translate world coordinate to eye coordinate
00384   FXVec3f worldToEye(FXVec3f w);
00385 
00386   /// Translate world coordinate to eye coordinate depth
00387   FXfloat worldToEyeZ(FXVec3f w);
00388 
00389   /// Translate eye coordinate to eye coordinate
00390   FXVec3f eyeToWorld(FXVec3f e);
00391 
00392   /// Calculate world coordinate vector from screen movement
00393   FXVec3f worldVector(FXint fx,FXint fy,FXint tx,FXint ty);
00394 
00395   ///  Change default object material setting
00396   void setMaterial(const FXMaterial &mtl);
00397 
00398   /// Return default object material setting
00399   void getMaterial(FXMaterial &mtl) const;
00400 
00401   /// Change camera field of view angle (in degrees)
00402   void setFieldOfView(FXdouble fv);
00403 
00404   /// Return camera field of view angle
00405   FXdouble getFieldOfView() const { return fov; }
00406 
00407   /// Change camera zoom factor
00408   void setZoom(FXdouble zm);
00409 
00410   /// Return camera zoom factor
00411   FXdouble getZoom() const { return zoom; }
00412 
00413   /// Change target point distance
00414   void setDistance(FXdouble ed);
00415 
00416   /// Return target point distance
00417   FXdouble getDistance() const { return distance; }
00418 
00419   /// Change unequal model scaling factors
00420   void setScale(FXVec3f s);
00421 
00422   /// Return current scaling factors
00423   const FXVec3f& getScale() const { return scale; }
00424 
00425   /// Change camera orientation from quaternion
00426   void setOrientation(FXQuatf rot);
00427 
00428   /// Return current camera orientation quaternion
00429   const FXQuatf& getOrientation() const { return rotation; }
00430 
00431   /// Change object center (tranlation)
00432   void setCenter(FXVec3f cntr);
00433 
00434   /// Return object center
00435   const FXVec3f& getCenter() const { return center; }
00436 
00437   /// Translate object center
00438   void translate(FXVec3f vec);
00439 
00440   /// Return boresight vector
00441   FXbool getBoreVector(FXint sx,FXint sy,FXVec3f& point,FXVec3f& dir);
00442 
00443   /// Return eyesight vector
00444   FXVec3f getEyeVector() const;
00445 
00446   /// Return eye position
00447   FXVec3f getEyePosition() const;
00448 
00449   /// Change help text
00450   void setHelpText(const FXString& text);
00451 
00452   /// Return help text
00453   const FXString& getHelpText() const { return help; }
00454 
00455   /// Change tip text
00456   void setTipText(const FXString&  text);
00457 
00458   /// Return tip text
00459   const FXString& getTipText() const { return tip; }
00460 
00461   /// Return the current transformation matrix
00462   const FXMat4f& getTransform() const { return transform; }
00463 
00464   /// Return the inverse of the current transformation matrix
00465   const FXMat4f& getInvTransform() const { return itransform; }
00466 
00467   /// Change the scene, i.e. the object being displayed.
00468   void setScene(FXGLObject* sc);
00469 
00470   /// Return the current scene object
00471   FXGLObject* getScene() const { return scene; }
00472 
00473   /// Change selection
00474   void setSelection(FXGLObject* sel);
00475 
00476   /// Return selection
00477   FXGLObject* getSelection() const { return selection; }
00478 
00479   /// Change the projection mode, PERSPECTIVE or PARALLEL
00480   void setProjection(FXuint proj);
00481 
00482   /// Return the projection mode
00483   FXuint getProjection() const { return projection; }
00484 
00485   /// Change both top and bottom background colors
00486   void setBackgroundColor(const FXVec4f& clr);
00487 
00488   /// Change top or bottom background color
00489   void setBackgroundColor(const FXVec4f& clr,FXbool bottom);
00490 
00491   /// Return top or bottom window background color
00492   const FXVec4f& getBackgroundColor(FXbool bottom) const { return background[bottom]; }
00493 
00494   /// Change global ambient light color
00495   void setAmbientColor(const FXVec4f& clr);
00496 
00497   /// Return global ambient light color
00498   const FXVec4f& getAmbientColor() const { return ambient; }
00499 
00500   /**
00501   * Read the pixels off the screen as array of FXColor;
00502   * this array can be directly passed to fxsaveBMP and other image
00503   * output routines.
00504   */
00505   FXbool readPixels(FXColor*& buffer,FXint x,FXint y,FXint w,FXint h);
00506 
00507   /**
00508   * Read the feedback buffer containing the current scene, returning used
00509   * and allocated size.
00510   */
00511   FXbool readFeedback(FXfloat*& buffer,FXint& used,FXint& size,FXint x,FXint y,FXint w,FXint h);
00512 
00513   /**
00514   * Change hidden-surface feedback buffer sorting algorithm.
00515   * This can be used for move/draw printed output depth sorting.
00516   */
00517   void setZSortFunc(FXZSortFunc func){ zsortfunc=func; }
00518 
00519   /// Return hidden surface sorting function.
00520   FXZSortFunc getZSortFunc() const { return zsortfunc; }
00521 
00522   /**
00523   * Change the maximum hits, i.e. the maximum size of the pick buffer.
00524   * When set to less than or equal to zero, picking is essentially turned off.
00525   */
00526   void setMaxHits(FXint maxh) { maxhits=maxh; }
00527 
00528   /// Return maximum pickbuffer size
00529   FXint getMaxHits() const { return maxhits; }
00530 
00531   /**
00532   * When drawing a GL object, if doesTurbo() is true, the object
00533   * may choose to perform a reduced complexity drawing as the user is
00534   * interactively manipulating; another update will be done later when
00535   * the full complexity drawing can be performed again.
00536   */
00537   FXbool doesTurbo() const { return doesturbo; }
00538 
00539   /// Return turbo mode setting
00540   FXbool getTurboMode() const { return turbomode; }
00541 
00542   /// Set turbo mode
00543   void setTurboMode(FXbool turbo=true);
00544 
00545   /// Return light source settings
00546   void getLight(FXLight& lite) const;
00547 
00548   /// Change light source settings
00549   void setLight(const FXLight& lite);
00550 
00551   /// Save viewer to a stream
00552   virtual void save(FXStream& store) const;
00553 
00554   /// Load viewer from a stream
00555   virtual void load(FXStream& store);
00556 
00557   /// Destructor
00558   virtual ~FXGLViewer();
00559   };
00560 
00561 }
00562 
00563 #endif
00564 

Copyright © 1997-2010 Jeroen van der Zijp