db.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: 2003/02/14 23:01:58 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/renderer/db.cpp,v $
00024                                                                         
00025                                                                         
00026 #include <string.h>
00027 
00028 #include "db.H"
00029 
00030 void
00031 MYPOINT::Transform(MATRIX *M)
00032 {
00033   float a,bb,c,d;
00034   a = p[0] * M->m[0][0] + p[1] * M->m[1][0] + p[2] * M->m[2][0] + 
00035     p[3] * M->m[3][0];
00036   bb = p[0] * M->m[0][1] + p[1] * M->m[1][1] + p[2] * M->m[2][1] + 
00037     p[3] * M->m[3][1];
00038   c = p[0] * M->m[0][2] + p[1] * M->m[1][2] + p[2] * M->m[2][2] + 
00039     p[3] * M->m[3][2];
00040   d = p[0] * M->m[0][3] + p[1] * M->m[1][3] + p[2] * M->m[2][3] + 
00041     p[3] * M->m[3][3];
00042   p[0] = a; p[1] = bb; p[2] = c; p[3] = d;
00043 }
00044 
00045 
00046 OPS_Stream &operator<<(OPS_Stream &os, MYPOINT &point)
00047 {
00048   os <<"Point  ("<<point.X()<<' '<<point.Y()<<' '<<
00049     point.Z()<<')';
00050   os << " (" << point.r << ' ' << point.g << ' ' << point.b << " )";
00051   return os;
00052 }
00053     
00054 OPS_Stream &operator<<(OPS_Stream &os, FACE &face)
00055 {
00056   os <<"Face: "<< endln;
00057   MYPOINT *point;
00058   FOR_EACH(point, face.pointList)
00059     {
00060       os << (*point) << endln;
00061     }
00062   return os;
00063 }
00064 

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