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

POV3DisplayDevice.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 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: POV3DisplayDevice.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.44 $       $Date: 2011/12/04 22:19:00 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *   Version 3 of the Persistence Of Vision raytracer
00019  *
00020  ***************************************************************************/
00021 
00022 #ifndef POV3DISPLAYDEVICE
00023 #define POV3DISPLAYDEVICE
00024 
00025 #include <stdio.h>
00026 #include "FileRenderer.h"
00027 
00028 // #define POV_FILTERED_TRANSPARENCY
00029 //
00030 // To use POV-Ray's filtered transparency (where rays passing through
00031 // transparent objects are 'tinted' the color of the transparent
00032 // object) uncomment the above line.
00033 //
00034 // Otherwise, unfiltered transparency is used (no tinting). NOTE
00035 // THAT UNFILTERED TRANSPARENCY IS ONLY AVAILABLE IN POV-RAY v. 3
00036 // AND ABOVE
00037 
00039 class POV3DisplayDevice : public FileRenderer {
00040 private:
00041   int old_materialIndex;    
00042   int clip_on[3];           
00043   int degenerate_cones;     
00044   int degenerate_cylinders; 
00045   int degenerate_triangles; 
00046 
00047   void reset_vars(void);    
00048   void write_materials(void);
00049 
00050 protected:
00051   // assorted graphics functions
00052   void comment(const char *);
00053   void cone(float * a, float * b, float rad); 
00054   void cylinder(float *, float *, float rad, int filled);
00055   void line(float *xyz1, float *xyz2);
00056   void point(float *xyz);
00057   void sphere(float *xyzr);
00058   void text(float *pos, float size, float thickness, const char *str);
00059   void triangle(const float *, const float *, const float *,
00060                 const float *, const float *, const float *);
00061   void tricolor(const float * xyz1, const float * xyz2, const float * xyz3,
00062                 const float * n1,   const float * n2,   const float * n3,
00063                 const float *c1,    const float *c2,    const float *c3);
00064   virtual void trimesh_c4n3v3(int numverts, float *cnv, 
00065                               int numfacets, int *facets);
00066   void tristrip(int numverts, const float *cnv, int numstrips, 
00067                 const int *vertsperstrip, const int *facets);
00068 
00069   void set_line_width(int new_width);
00070   void start_clipgroup(void);
00071   void end_clipgroup(void);
00072 
00073 public: 
00074   POV3DisplayDevice(void);
00075   virtual ~POV3DisplayDevice(void);
00076   void write_header(void); 
00077   void write_trailer(void);
00078 }; 
00079 
00080 #endif
00081 

Generated on Sat May 26 01:48:21 2012 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002