00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef glutil_h__
00036 #define glutil_h__
00037
00038 #include <vector>
00039 #include "vec3.h"
00040 #include "transform.h"
00041
00042 using std::vector;
00043
00044 namespace EMAN
00045 {
00046 class EMData;
00047 class MarchingCubes;
00048
00049 class GLUtil {
00050 public:
00054 static unsigned int gen_glu_mipmaps(const EMData* const emdata);
00055
00059 static unsigned int gen_gl_texture(const EMData* const emdata);
00060
00064 static unsigned int render_amp8_gl_texture(EMData* emdata, int x0, int y0, int ixsize, int iysize, int bpl, float scale, int mingray, int maxgray, float render_min, float render_max,float gamma,int flags);
00065
00069 static int nearest_projected_points(const vector<float>& model_matrix, const vector<float>& proj_matrix, const vector<int>& view_matrix, const vector<Vec3f>& points, const float mouse_x, const float mouse_y,const float& nearnes);
00070 static void colored_rectangle(const vector<float>& data,const float& alpha, const bool center_point=false);
00071 static void mx_bbox(const vector<float>& data, const vector<float>& text_color, const vector<float>& bg_color);
00072
00091 static std::string render_amp8(EMData * emdata, int x, int y, int xsize, int ysize,
00092 int bpl, float scale, int min_gray, int max_gray,
00093 float min_render, float max_render,float gamma,int flags);
00094
00100 static unsigned long get_isosurface_dl(MarchingCubes* mc, unsigned int tex_id = 0, bool surface_face_z = false);
00101
00106 static void glLoadMatrix(const Transform& xform);
00107
00112 static void glMultMatrix(const Transform& xform);
00113
00114 };
00115 }
00116
00117 #endif //glutil_h__