Scan.hGo 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.1.1.1 $ 00022 // $Date: 2000/09/15 08:23:27 $ 00023 // $Source: /usr/local/cvs/OpenSees/SRC/renderer/Scan.h,v $ 00024 00025 00026 #ifndef Scan_H 00027 #define Scan_H 00028 00029 #include "db.H" 00030 class Device; 00031 class Projection; 00032 00033 // This module transforms a list of polygons in device coordinates 00034 // into pixels that represent these polygons. 00035 00036 #define EVEN_ODD 1 00037 #define WINDING 2 00038 00039 class ScanLineConverter 00040 { 00041 public: 00042 ScanLineConverter(); 00043 ~ScanLineConverter(); 00044 00045 int update(void); 00046 void scanLine(FACE &FACE); 00047 void scanPolygon(FACE &FACE); 00048 void setFillMode(int mode); 00049 void setScanMode(int mode); 00050 00051 void setDevice(Device &theDevice); 00052 void setProjection(Projection &theProjection); 00053 00054 private: 00055 int width; 00056 int length; 00057 int fillMode; // wire == 1, otherwise fill 00058 int scanMode; // WINDING or EVEN_ODD 00059 float *zBuffer; 00060 int sizeBuffer; 00061 00062 void DrawWire(FACE &face); // Draws a single face in wireframe 00063 void DrawFill(FACE &face); // Draws a face using fill 00064 00065 Device *theDevice; 00066 Projection *theProjection; 00067 }; 00068 00069 #endif 00070 00071 |