plot_funcs.h

00001 #ifndef __PLOT_FUNCS_H__
00002 #define __PLOT_FUNCS_H__
00003 
00004 #include "png.h"
00005 #include "Curve.h"
00006 #include "colors.h"
00007 #include "pngwrite.h"
00008 
00009 #ifdef COMPUTE_IN_R4
00010 #include "Vector4.h"
00011 #include "Matrix4.h"
00012 #define TVec Vector4
00013 #else
00014 #define TVec Vector3
00015 #endif
00016 
00017 enum PLOT_TYPE { PT_PLOT = 1, PP_PLOT, TT_PLOT };
00018 
00019 void samplePtTg(const float from, const float to,
00020                 const int N, const Curve<TVec> &c,
00021                                                     TVec* pts, TVec* tgs);
00022 
00023 void computePT(const int w, const int h,
00024                const TVec* Pts_i, const TVec* Tg_i,
00025                const TVec* Pts_j, const TVec* Tg_j,
00026                                                          const float thickness,
00027                                                          float* table,
00028                                                          float* min, float *max
00029                );
00030 
00031 void computePP(const int w, const int h,
00032                const TVec* Pts_i, const TVec* Pts_j, 
00033                                                          const float thickness,
00034                                                          float* table,
00035                                                          float* min, float *max
00036                );
00037 
00038 void computeTT(const int w, const int h,
00039                const TVec* Pts_i, const TVec* Tg_i,
00040                const TVec* Pts_j, const TVec* Tg_j,
00041                                                          const float thickness,
00042                                                          float* table,
00043                                                          float* min, float *max
00044                );
00045 
00046 void convertToColoring(const int w, const int h,
00047                        const float min, const float max,
00048                                                                                          const float* table,
00049                                                                                          void(*gradient)(RGB*,float,float,float),
00050                        unsigned char* px);
00051 
00052 void DoPlot(const char* name, int w, int h,
00053             const float fromx, const float tox,
00054                                                 const float fromy, const float toy,
00055                                                 const PLOT_TYPE &ptype,
00056             const int CLOSED, const int HEIGHTMAP);
00057 
00058 #endif // __PLOT_FUNCS_H__

Generated on Mon Feb 8 17:22:35 2010 for libbiarc by  doxygen 1.5.6