00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
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);
00037 void write_colormaterial(float *, int);
00038
00039 void cylinder_noxfrm(float *a, float *b, float rad, int filled);
00040
00041 protected:
00042
00043 void comment(const char *);
00044 void cone (float *a, float *b, float rad, int );
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