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

Vrml2DisplayDevice.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: Vrml2DisplayDevice.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.25 $       $Date: 2011/11/10 17:05:35 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *   VRML2 / VRML97 scene export code
00019  ***************************************************************************/
00020 
00021 #ifndef VRML2DISPLAYDEVICE_H
00022 #define VRML2DISPLAYDEVICE_H
00023 
00024 #include <stdio.h>
00025 #include "FileRenderer.h"
00026 
00028 class Vrml2DisplayDevice : public FileRenderer {
00029 private:
00030   void write_cindexmaterial(int, int); // write colors, materials etc.
00031   void write_colormaterial(float *, int); // write colors, materials etc.
00032 
00033   void cylinder_noxfrm(float *a, float *b, float rad, int filled);
00034 
00035 protected:
00036   // assorted graphics functions
00037   void comment(const char *);
00038   void cone    (float *a, float *b, float rad);
00039   void cylinder(float *a, float *b, float rad, int filled);
00040   void line(float *xyz1, float *xyz2);
00041   void point(float *xyz);
00042   void sphere(float *xyzr);
00043   void text(float *pos, float size, float thickness, const char *str);
00044   void triangle(const float *, const float *, const float *,
00045                 const float *, const float *, const float *);
00046   void tricolor(const float * xyz1, const float * xyz2, const float * xyz3,
00047                 const float * n1,   const float * n2,   const float * n3,
00048                 const float *c1,    const float *c2,    const float *c3);
00049   virtual void trimesh_c4n3v3(int numverts, float * cnv, 
00050                               int numfacets, int * facets);
00051   virtual void tristrip(int numverts, const float * cnv,
00052                         int numstrips, const int *vertsperstrip,
00053                         const int *facets);
00054 
00055   void load(const Matrix4& mat);       
00056   void multmatrix(const Matrix4& mat); 
00057   void set_color(int color_index);     
00058 
00059 public:
00060   Vrml2DisplayDevice(void);
00061   void write_header(void);
00062   void write_trailer(void);
00063 }; 
00064 
00065 #endif
00066 
00067 
00068 

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