00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00023 #ifndef TACHYONDISPLAYDEVICE
00024 #define TACHYONDISPLAYDEVICE
00025
00026 #include <stdio.h>
00027 #include "FileRenderer.h"
00028
00030 class TachyonDisplayDevice : public FileRenderer {
00031 private:
00032 int inclipgroup;
00033 int involtex;
00034 int voltexID;
00035 float xplaneeq[4];
00036 float yplaneeq[4];
00037 float zplaneeq[4];
00038
00039 void reset_vars(void);
00040 void write_camera(void);
00041 void write_lights(void);
00042 void write_materials(void);
00043 void write_cindexmaterial(int, int);
00044 void write_colormaterial(float *, int);
00045
00046 protected:
00047
00048 void comment(const char *);
00049 void cylinder(float *, float *, float rad, int filled);
00050 void line(float *xyz1, float *xyz2);
00051 void point(float *xyz);
00052 void sphere(float *xyzr);
00053 virtual void sphere_array(int num, int res, float *centers, float *radii, float *colors);
00054 void text(float *pos, float size, float thickness, const char *str);
00055 void triangle(const float *, const float *, const float *,
00056 const float *, const float *, const float *);
00057 void tricolor(const float * xyz1, const float * xyz2, const float * xyz3,
00058 const float * n1, const float * n2, const float * n3,
00059 const float * c1, const float * c2, const float * c3);
00060 virtual void trimesh_c4n3v3(int numverts, float * cnv,
00061 int numfacets, int * facets);
00062 virtual void trimesh_c4u_n3b_v3f(unsigned char *c, signed char *n,
00063 float *v, int numfacets);
00064 virtual void tristrip(int numverts, const float * cnv,
00065 int numstrips, const int *vertsperstrip,
00066 const int *facets);
00067
00068
00069 virtual void define_volume_texture(int ID, int xs, int ys, int zs,
00070 const float *xplaneeq,
00071 const float *yplaneeq,
00072 const float *zplaneeq,
00073 unsigned char *texmap);
00074
00075
00076 virtual void volume_texture_on(int texmode);
00077
00078
00079 virtual void volume_texture_off(void);
00080
00081
00082
00083 void start_clipgroup(void);
00084 void end_clipgroup(void);
00085
00086 void update_exec_cmd();
00087
00088 public:
00089 TachyonDisplayDevice(void);
00090 virtual ~TachyonDisplayDevice(void);
00091 void write_header(void);
00092 void write_trailer(void);
00093 };
00094
00095 #endif
00096