28 #ifndef opengl_glutils_H
29 #define opengl_glutils_H
34 #ifndef opengl_CRenderizable_H
56 int vp_x,
vp_y, vp_width, vp_height;
66 void projectPoint(
float x,
float y,
float z,
float &proj_x,
float &proj_y,
float &proj_z_depth)
const
68 const Eigen::Matrix<float,4,1,Eigen::ColMajor> proj = full_matrix * Eigen::Matrix<float,4,1,Eigen::ColMajor>(x,y,z,1);
69 proj_x = proj[3] ? proj[0]/proj[3] : 0;
70 proj_y = proj[3] ? proj[1]/proj[3] : 0;
71 proj_z_depth = proj[2];
75 void projectPointPixels(
float x,
float y,
float z,
float &proj_x_px,
float &proj_y_px,
float &proj_z_depth)
const
77 projectPoint(x,y,z,proj_x_px,proj_y_px,proj_z_depth);
78 proj_x_px = (proj_x_px+1.0f)*(vp_width/2);
79 proj_y_px = (proj_y_px+1.0f)*(vp_height/2);
146 const float msg_x,
const float msg_y,
147 const float msg_w,
const float msg_h,
148 const std::string &text,
153 const float border_width = 4.0f,
154 const std::string & text_font = std::string(
"sans"),
156 const double text_spacing = 1.5,
157 const double text_kerning = 0.1
172 const std::string &str,