00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00024 #ifndef VRMLDISPLAYDEVICE_H
00025 #define VRMLDISPLAYDEVICE_H
00026 
00027 #include <stdio.h>
00028 #include "FileRenderer.h"
00029 
00031 class VrmlDisplayDevice : public FileRenderer {
00032 private:
00033   struct triList {
00034     triList *next;
00035     int ptz[3];
00036   };
00037   triList *tList;
00038   void write_cindexmaterial(int, int); 
00039   void write_colormaterial(float *, int); 
00040 
00041 protected:
00042   void comment(const char *);
00043   void cone(float *a, float *b, float rad, int );
00044   void cylinder(float *a, float *b, float rad, int filled);
00045   void line(float *xyz1, float *xyz2);
00046   void sphere(float *xyzr);
00047   void triangle(const float *, const float *, const float *,
00048                 const float *, const float *, const float *);
00049 
00051   void push(void);
00052   void pop(void);
00053   void load(const Matrix4& mat);
00054   void multmatrix(const Matrix4& mat);
00055   void set_color(int color_index); 
00056 
00057 public:
00058   VrmlDisplayDevice(void);
00059   void write_header(void);
00060   void write_trailer(void);
00061 }; 
00062 
00063 #endif
00064 
00065 
00066