TclFeViewer.h

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020                                                                         
00021 // $Revision: 1.7 $
00022 // $Date: 2004/11/24 23:58:15 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/tcl/TclFeViewer.h,v $
00024                                                                         
00025                                                                         
00026 // File: ~/modelbuilder/tcl/TclFeViewer.h.h
00027 // 
00028 // Written: fmk 
00029 // Created: 4/99
00030 // Revision: A
00031 //
00032 // Description: This file contains the class definition for TclFeViewer.
00033 // A TclFeViewer adds commands to the interpreter for displaying the model.
00034 //
00035 // What: "@(#) ModelBuilder.h, revA"
00036 
00037 #ifndef TclFeViewer_h
00038 #define TclFeViewer_h
00039 
00040 #include <Recorder.h>
00041 class Renderer;
00042 class ColorMap;
00043 
00044 extern "C" {
00045 #include <tcl.h>
00046 #include <tk.h>
00047 }
00048 
00049 class TclFeViewer : public Recorder
00050 {
00051   public:
00052     TclFeViewer(const char *title, int xLoc, int yLoc, int width, int height,
00053                 Domain &theDomain, int wipeFlag, 
00054                 Tcl_Interp *interp);
00055 
00056     TclFeViewer(const char *title, int xLoc, int yLoc, int width, int height, const char *fileName,
00057                 Domain &theDomain, 
00058                 Tcl_Interp *interp);
00059     
00060     ~TclFeViewer();    
00061 
00062     int buildFE_Model(void);
00063     
00064     int record(int commitTag, double timeStamp);
00065     int playback(int commitTag);
00066     int restart(void);    
00067 
00068     // methods invoked on the ViewingSystem
00069     int setVRP(float, float, float); // point on view plane    
00070     int setVPN(float, float, float); // view plane normal
00071     int setVUP(float, float, float); // view-up vector
00072     int setViewWindow(float, float, float, float); // view bounds
00073                                // umin, umax, vmin, vmax
00074 
00075     int setPlaneDist(float, float); // location of
00076                                // near, view & far clipping planes
00077 
00078     int setProjectionMode(const char *); // 
00079     int setFillMode(const char *);    // 1 = wire, otherwise fill
00080     
00081     int setPRP(float, float, float); // eye location, global coords
00082 
00083     int setPortWindow(float, float, float, float); // view port
00084                               // left, right, bottom, top [-1,1,-1,1]
00085 
00086 
00087     // methods invoked on the FE_Viewer
00088     int displayModel(int eleFlag, int nodeFlag, float displayFact);
00089     int clearImage(void);
00090     int saveImage(const char *fileName);
00091     int saveImage(const char *imageName, const char *fileName);
00092 
00093   protected:
00094 
00095   private:
00096     ColorMap *theMap;
00097     Renderer *theRenderer;
00098     Domain *theDomain;
00099     int theEleMode;
00100     int theNodeMode;    
00101     double theDisplayFact;
00102     int wipeFlag;
00103     int vrpSet;
00104     int vpwindowSet;
00105     int clippingPlaneDistancesSet;
00106 };
00107 
00108 #endif
00109 
00110 
00111 
00112 
00113 
00114 
00115 

Generated on Mon Oct 23 15:05:30 2006 for OpenSees by doxygen 1.5.0