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

Renderer.cpp

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.2 $
00022 // $Date: 2001/07/26 00:56:06 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/renderer/Renderer.cpp,v $
00024                                                                         
00025                                                                         
00026 // File: ~/renderer/Renderer.C
00027 //
00028 // Written: fmk 
00029 // Created: 10/98
00030 // Revision: A
00031 //
00032 // Description: This file contains the class interface for Renderer.
00033 // Renderer is an abstract base class. An Renderer object is used
00034 // to create an image of the domain.
00035 //
00036 // What: "@(#) Renderer.h, revA"
00037 
00038 #include <Renderer.h>
00039 #include <ColorMap.h>
00040 #include <Domain.h>
00041 
00042 
00043 Renderer::Renderer(ColorMap &_theMap)
00044   :theMap(&_theMap)
00045 {
00046 
00047 }
00048 
00049 Renderer::~Renderer()
00050 {
00051 
00052 }
00053 
00054 /*
00055 int 
00056 Renderer::displayModel(int eleFlag, int nodeFlag, 
00057          float fact)
00058 {
00059   // loop over the elements getting each to display itself
00060   // using this and displayTag as arguments.
00061   // first clear the image
00062   this->startImage();
00063   int res = 0;
00064 
00065   if (eleFlag >= 0) {
00066       ElementIter &theElements = theDomain->getElements();
00067       Element *theEle;
00068       while ((theEle = theElements()) != 0) {
00069    res = theEle->displaySelf(*this, eleFlag, fact);
00070    if (res < 0) {
00071        cerr << "Renderer::displayModel() - Element: ";
00072        cerr << theEle->getTag() << " failed to display itself\n";
00073    }
00074       }
00075   }
00076   
00077   if (nodeFlag >= 0) {
00078       NodeIter &theNodes = theDomain->getNodes();
00079       Node *theNode;
00080       while ((theNode = theNodes()) != 0) {
00081    res = theNode->displaySelf(*this, nodeFlag, fact);
00082    if (res < 0) {
00083        cerr << "Renderer::displayModel() - Node: ";
00084        cerr << theNode->getTag() << " failed to display itself\n";
00085    }
00086       }
00087   }  
00088 
00089   // now mark the image has having been completed
00090   this->doneImage();
00091   return res;
00092 }
00093 */
00094 
00095 int
00096 Renderer::drawVector(const Vector &position, const Vector &value, double factor)
00097 {
00098     return 0;
00099 }
00100 
00101 
00102 void
00103 Renderer::setColorMap(ColorMap &map)
00104 {
00105     theMap = &map;
00106 }
00107 
00108 
00109 
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117 
00118 
00119 
00120 
Copyright Contact Us