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

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

Generated on Fri Mar 29 02:46:02 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002