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

Vrml2DisplayDevice.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: Vrml2DisplayDevice.h,v $
00012  *      $Author: johns $        $Locker:  $             $State: Exp $
00013  *      $Revision: 1.31 $       $Date: 2020/07/01 06:09:05 $
00014  *
00015  ***************************************************************************/
00027 #ifndef VRML2DISPLAYDEVICE_H
00028 #define VRML2DISPLAYDEVICE_H
00029 
00030 #include <stdio.h>
00031 #include "FileRenderer.h"
00032 
00034 class Vrml2DisplayDevice : public FileRenderer {
00035 private:
00036   void write_cindexmaterial(int, int); // write colors, materials etc.
00037   void write_colormaterial(float *, int); // write colors, materials etc.
00038 
00039   void cylinder_noxfrm(float *a, float *b, float rad, int filled);
00040 
00041 protected:
00042   // assorted graphics functions
00043   void comment(const char *);
00044   void cone    (float *a, float *b, float rad, int /* resolution */);
00045   void cylinder(float *a, float *b, float rad, int filled);
00046   void line(float *xyz1, float *xyz2);
00047   void point(float *xyz);
00048   void sphere(float *xyzr);
00049   void text(float *pos, float size, float thickness, const char *str);
00050   void triangle(const float *, const float *, const float *,
00051                 const float *, const float *, const float *);
00052   void tricolor(const float * xyz1, const float * xyz2, const float * xyz3,
00053                 const float * n1,   const float * n2,   const float * n3,
00054                 const float *c1,    const float *c2,    const float *c3);
00055   virtual void trimesh_c4n3v3(int numverts, float * cnv, 
00056                               int numfacets, int * facets);
00057   virtual void trimesh_c4u_n3b_v3f(unsigned char *c, signed char *n,
00058                                    float *v, int numfacets);
00059   virtual void tristrip(int numverts, const float * cnv,
00060                         int numstrips, const int *vertsperstrip,
00061                         const int *facets);
00062 
00063   void load(const Matrix4& mat);       
00064   void multmatrix(const Matrix4& mat); 
00065   void set_color(int color_index);     
00066 
00067 public:
00068   Vrml2DisplayDevice(void);
00069   void write_header(void);
00070   void write_trailer(void);
00071 }; 
00072 
00073 #endif
00074 
00075 
00076 

Generated on Thu Mar 28 02:44:27 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002