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

LibTachyonDisplayDevice.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: LibTachyonDisplayDevice.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.29 $       $Date: 2011/02/23 05:33:38 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *
00019  *  Tachyon Parallel / Multiprocessor Ray Tracer
00020  *
00021  ***************************************************************************/
00022 
00023 #ifndef LIBTACHYONDISPLAYDEVICE
00024 #define LIBTACHYONDISPLAYDEVICE
00025 
00026 #include <stdio.h>
00027 #include "FileRenderer.h"
00028 #include "tachyon.h"       // main Tachyon library header
00029 
00031 class LibTachyonDisplayDevice : public FileRenderer {
00032 private:
00033   SceneHandle rtscene;        
00034   int enablemirrorspecular;   
00035   float phongspecularthresh;  
00036   int inclipgroup;            
00037   int involtex;               
00038   int voltexID;               
00039   float xplaneeq[4];          
00040   float yplaneeq[4];
00041   float zplaneeq[4];
00042   rt_timerhandle buildtime;   
00043   rt_timerhandle rendertime;  
00044 
00045   void reset_vars(void);      
00046   void * tex_cindexmaterial(int, int); 
00047   void * tex_colormaterial(float *rgb, int); 
00048   void write_camera(void);    
00049   void write_lights(void);    
00050   void write_materials(void); 
00051 
00052 protected:
00053   // assorted graphics functions
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   virtual void sphere_array(int num, int res, float *centers, float *radii, float *colors);
00059   void text(float *pos, float size, float thickness, const char *str);
00060   void triangle(const float *, const float *, const float *, 
00061                 const float *, const float *, const float *);
00062   void tricolor(const float * xyz1, const float * xyz2, const float * xyz3,
00063                 const float * n1,   const float * n2,   const float * n3,
00064                 const float *c1,    const float *c2,    const float *c3);
00065   void tristrip(int numverts, const float *cnv, int numstrips, 
00066                 const int *vertsperstrip, const int *facets);
00067 
00068   // define a volumetric texture map
00069   virtual void define_volume_texture(int ID, int xs, int ys, int zs,
00070                                      const float *xplaneeq,
00071                                      const float *yplaneeq,
00072                                      const float *zplaneeq,
00073                                      unsigned char *texmap);
00074 
00075   // enable volumetric texturing, either in "replace" or "modulate" mode
00076   virtual void volume_texture_on(int texmode);
00077 
00078   // disable volumetric texturing
00079   virtual void volume_texture_off(void);
00080 
00081   // begin a group of objects to be clipped by the same set of
00082   // clipping planes
00083   void start_clipgroup(void);
00084   void end_clipgroup(void);
00085    
00086 public: 
00087   LibTachyonDisplayDevice(void);           // constructor
00088   virtual ~LibTachyonDisplayDevice(void);  // destructor
00089   virtual int open_file(const char *filename);
00090   virtual void close_file(void);
00091   void write_header(void); 
00092   void write_trailer(void);
00093 }; 
00094 
00095 #endif
00096 

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