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

WavefrontDisplayDevice.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr
00003  *cr            (C) Copyright 1995-2019 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.18 $       $Date: 2020/07/01 06:09:05 $
00014  *
00015  ***************************************************************************/
00032 #ifndef WavefrontDISPLAYDEVICE
00033 #define WavefrontDISPLAYDEVICE
00034 
00035 #include <stdio.h>
00036 #include "FileRenderer.h"
00037 
00039 class WavefrontDisplayDevice : public FileRenderer {
00040 private:
00041   FILE *mtlfile;     
00042   char *mtlfilename; 
00043   int oldColorIndex;
00044   int oldMaterialIndex;
00045   int oldMaterialState;
00046   void write_material_block(void);        
00047   void write_cindexmaterial(int, int);    
00048   void write_colormaterial(float *, int); 
00049 
00050 protected:
00051   void beginrepgeomgroup(const char *);
00052   void comment(const char *);
00053   void line(float *xyz1, float *xyz2);
00054   void point(float *xyz);
00055   void triangle(const float *, const float *, const float *,
00056                 const float *, const float *, const float *);
00057   virtual void trimesh_c4n3v3(int numverts, float * cnv, 
00058                               int numfacets, int * facets);
00059   virtual void trimesh_c4u_n3b_v3f(unsigned char *c, signed char *n,
00060                                    float *v, int numfacets);
00061   virtual void tristrip(int numverts, const float * cnv,
00062                         int numstrips, const int *vertsperstrip,
00063                         const int *facets);
00064 
00065 public:
00066   WavefrontDisplayDevice(void);            // constructor
00067   virtual ~WavefrontDisplayDevice(void);   // destructor
00068   virtual int open_file(const char *filename);
00069   virtual void close_file(void);
00070   void write_header (void);
00071   void write_trailer(void);
00072 };
00073 
00074 #endif
00075 

Generated on Sat Apr 20 02:44:00 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002