00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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);
00031 void write_colormaterial(float *, int);
00032
00033 void cylinder_noxfrm(float *a, float *b, float rad, int filled);
00034
00035 protected:
00036
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