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