00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00021 #ifndef PSDISPLAYDEVICE_H
00022 #define PSDISPLAYDEVICE_H
00023
00024 #include <stdio.h>
00025 #include "DepthSortObj.h"
00026 #include "DispCmds.h"
00027 #include "FileRenderer.h"
00028 #include "SortableArray.h"
00029
00031 class PSDisplayDevice : public FileRenderer {
00032 private:
00033 SortableArray <DepthSortObject> depth_list;
00034 float x_scale, y_scale;
00035 float x_offset, y_offset;
00036
00038 int memerror;
00039
00041 void process_depth_list(void);
00042
00044 void set_sphere_res(int res);
00045
00047
00048
00049 void sphere_approx(float *c, float r);
00050 void cylinder_approx(float *a, float *b, float r, int res, int filled);
00051 void cone_approx(float *a, float *b, float r);
00052 void decompose_mesh(DispCmdTriMesh *mesh);
00053 void decompose_tristrip(DispCmdTriStrips *strip);
00055
00056 inline float compute_dist(float *c);
00057 float compute_light(float *a, float *b, float *c);
00058 float norm_light[3];
00059
00061
00062
00063 int sph_iter;
00064 int sph_desired_iter;
00065 int sph_nverts;
00066 float *sph_verts;
00068
00070
00071 long memusage;
00072 long points;
00073 long objects;
00075
00076 protected:
00077 virtual void comment(const char *s);
00078
00079 public:
00080 PSDisplayDevice(void);
00081 ~PSDisplayDevice(void);
00082 virtual void write_header(void);
00083 virtual void write_trailer(void);
00084
00089 virtual void render(const VMDDisplayList *display_list);
00090 virtual void render_done(void);
00091 };
00092
00093 #endif
00094