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

Renderer.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.3 $
00022 // $Date: 2001/07/26 00:56:05 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/renderer/Renderer.h,v $
00024                                                                         
00025                                                                         
00026 // File: ~/renderer/Renderer.h
00027 //
00028 // Written: fmk 
00029 // Created: 10/98
00030 // Revision: A
00031 //
00032 // Description: This file contains the class definition for Renderer.
00033 // Renderer is an abstract base class. An Renderer object is used
00034 // to process 3d graphics.
00035 //
00036 // What: "@(#) Renderer.h, revA"
00037 
00038 #ifndef Renderer_h
00039 #define Renderer_h
00040 
00041 #include <Vector.h>
00042 #include <Matrix.h>
00043 #include <ColorMap.h>
00044 
00066 class Renderer
00067 {
00068   public:
00073     Renderer(ColorMap &theMap);    
00074 
00078     virtual ~Renderer();
00079 
00080 
00082     void setColorMap(ColorMap &theMap);
00083 
00085     virtual int clearImage(void) =0;    
00086 
00088     virtual int startImage(void) =0;    
00093     virtual int doneImage(void) =0;
00094 
00095 
00097     virtual int drawPoint(const Vector &, float V1, int width = 1) =0;
00099     virtual int drawPoint(const Vector &, const Vector &rgb1, int width = 1) =0;
00100 
00101 
00103     virtual int drawLine(const Vector &, const Vector &, 
00104     float V1, float V2, int width = 1, int style = 1) =0;
00105 
00107     virtual int drawLine(const Vector &end1, const Vector &end2, 
00108     const Vector &rgb1, const Vector &rgb2,
00109     int width = 1, int style = 1) =0;
00110     
00112     virtual int drawPolygon(const Matrix &points, const Vector &values) =0;
00114     virtual int drawPolygon(const Matrix &points, const Matrix &rgbValues) =0;
00115 
00117     virtual int drawVector(const Vector &position, const Vector &value, double factor);
00118     
00120     virtual int drawText(const Vector &posGlobal, char *string, int length, 
00121      char horizontalJustify = 'l', char verticalJustify = 'b') =0;    
00122 
00123     // 
00124     // the following are for setting up the vieing system
00125     //
00126 
00128     virtual int setVRP(float x, float y, float z) =0; 
00129     virtual int setVPN(float x, float y, float z) =0; 
00130     virtual int setVUP(float x, float y, float z) =0; // view-up vector
00131  
00133     virtual int setViewWindow(float, float, float, float) =0; // view bounds
00135 
00136     virtual int setPlaneDist(float, float) =0; // location of
00138 
00139     virtual int setProjectionMode(char *mode) =0; 
00140     virtual int setFillMode(char *mode) =0;    
00141     
00142     virtual int setPRP(float u, float v, float n) =0; // eye location if 
00143                         // perspective, dirn to +ViewPlane if parallel
00144 
00146     virtual int setPortWindow(float, float, float, float) =0; // view port
00148 
00149 
00150   protected:
00151     ColorMap *theMap;
00152     
00153   private:
00154 };
00155 
00156 
00157 #endif
00158 
Copyright Contact Us