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

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

Generated on Wed Apr 24 02:42:32 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002