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