00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00021 #ifndef POV3DISPLAYDEVICE
00022 #define POV3DISPLAYDEVICE
00023
00024 #include <stdio.h>
00025 #include "FileRenderer.h"
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00038 class POV3DisplayDevice : public FileRenderer {
00039 private:
00040 int old_materialIndex;
00041 int clip_on[3];
00042 int degenerate_cones;
00043 int degenerate_cylinders;
00044 int degenerate_triangles;
00045
00046 void reset_vars(void);
00047 void write_materials(void);
00048
00049 protected:
00050
00051 void comment(const char *);
00052 void cone(float * a, float * b, float rad, int );
00053 void cylinder(float *, float *, float rad, int filled);
00054 void line(float *xyz1, float *xyz2);
00055 void point(float *xyz);
00056 void sphere(float *xyzr);
00057 void text(float *pos, float size, float thickness, const char *str);
00058 void triangle(const float *, const float *, const float *,
00059 const float *, const float *, const float *);
00060 void tricolor(const float * xyz1, const float * xyz2, const float * xyz3,
00061 const float * n1, const float * n2, const float * n3,
00062 const float *c1, const float *c2, const float *c3);
00063 virtual void trimesh_c4n3v3(int numverts, float *cnv,
00064 int numfacets, int *facets);
00065 virtual void trimesh_c4u_n3b_v3f(unsigned char *c, signed char *n,
00066 float *v, int numfacets);
00067 void tristrip(int numverts, const float *cnv, int numstrips,
00068 const int *vertsperstrip, const int *facets);
00069
00070 void set_line_width(int new_width);
00071 void start_clipgroup(void);
00072 void end_clipgroup(void);
00073
00074 public:
00075 POV3DisplayDevice(void);
00076 virtual ~POV3DisplayDevice(void);
00077 void write_header(void);
00078 void write_trailer(void);
00079 };
00080
00081 #endif
00082