Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

WavefrontDisplayDevice.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr
00003  *cr            (C) Copyright 1995-2011 The Board of Trustees of the
00004  *cr                        University of Illinois
00005  *cr                         All Rights Reserved
00006  *cr
00007  ***************************************************************************/
00008 /***************************************************************************
00009  * RCS INFORMATION:
00010  *
00011  *      $RCSfile: WavefrontDisplayDevice.h,v $
00012  *      $Author: johns $        $Locker:  $             $State: Exp $
00013  *      $Revision: 1.13 $       $Date: 2011/11/10 17:05:35 $
00014  *
00015  ***************************************************************************
00016  * DESCRIPTION:
00017  *   Use to make Wavefront "OBJ" files for importing into numerous animation
00018  *   systems.
00019  *
00020  ***************************************************************************/
00021 
00022 #ifndef WavefrontDISPLAYDEVICE
00023 #define WavefrontDISPLAYDEVICE
00024 
00025 #include <stdio.h>
00026 #include "FileRenderer.h"
00027 
00029 class WavefrontDisplayDevice : public FileRenderer {
00030 private:
00031   FILE *mtlfile;     
00032   char *mtlfilename; 
00033   int oldColorIndex;
00034   int oldMaterialIndex;
00035   int oldMaterialState;
00036   void write_material_block(void);        
00037   void write_cindexmaterial(int, int);    
00038   void write_colormaterial(float *, int); 
00039 
00040 protected:
00041   void beginrepgeomgroup(const char *);
00042   void comment(const char *);
00043   void line(float *xyz1, float *xyz2);
00044   void point(float *xyz);
00045   void triangle(const float *, const float *, const float *,
00046                 const float *, const float *, const float *);
00047   virtual void trimesh_c4n3v3(int numverts, float * cnv, 
00048                               int numfacets, int * facets);
00049   virtual void tristrip(int numverts, const float * cnv,
00050                         int numstrips, const int *vertsperstrip,
00051                         const int *facets);
00052 
00053 public:
00054   WavefrontDisplayDevice(void);            // constructor
00055   virtual ~WavefrontDisplayDevice(void);   // destructor
00056   virtual int open_file(const char *filename);
00057   virtual void close_file(void);
00058   void write_header (void);
00059   void write_trailer(void);
00060 };
00061 
00062 #endif
00063 

Generated on Wed May 23 01:50:36 2012 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002