28 float xmin,
float ymin,
float zmin,
float xmax,
float ymax,
float zmax,
29 float frecuency,
float lineWidth,
bool marks)
36 m_frequency(frecuency),
37 m_lineWidth(lineWidth),
40 for (
int i = 0; i < 3; i++) m_marks[i] = marks;
43 m_textRot[0][0] = 180.f;
44 m_textRot[0][1] = 0.f;
45 m_textRot[0][2] = 90.f;
47 m_textRot[1][0] = 90.f;
48 m_textRot[1][1] = 0.f;
49 m_textRot[1][2] = 90.f;
51 m_textRot[2][0] = 180.f;
52 m_textRot[2][1] = 0.f;
53 m_textRot[2][2] = 90.f;
57 float xmin,
float ymin,
float zmin,
float xmax,
float ymax,
float zmax,
58 float frecuency,
float lineWidth,
bool marks)
62 xmin, ymin, zmin, xmax, ymax,
zmax, frecuency, lineWidth, marks));
67 #if MRPT_HAS_OPENGL_GLUT
81 glColor4ub(m_color.R, m_color.G, m_color.B, m_color.A);
108 for (
float i = m_xmin; i <= m_xmax; i = i + m_frequency)
134 for (
float i = m_ymin; i <= m_ymax; i = i + m_frequency)
136 if (std::abs(i) > 1e-4)
163 for (
float i = m_zmin; i <= m_zmax; i = i + m_frequency)
165 if (std::abs(i) > 1e-4)
197 writeToStreamRender(out);
198 out << m_xmin << m_ymin << m_zmin;
199 out << m_xmax << m_ymax << m_zmax;
200 out << m_frequency << m_lineWidth;
202 out << m_marks[0] << m_marks[1] << m_marks[2] << m_textScale;
203 for (
int i = 0; i < 3; i++)
204 for (
int j = 0; j < 3; j++) out << m_textRot[i][j];
214 readFromStreamRender(
in);
215 in >> m_xmin >> m_ymin >> m_zmin;
216 in >> m_xmax >> m_ymax >> m_zmax;
217 in >> m_frequency >> m_lineWidth;
220 in >> m_marks[0] >> m_marks[1] >> m_marks[2] >> m_textScale;
221 for (
int i = 0; i < 3; i++)
222 for (
int j = 0; j < 3; j++) in >> m_textRot[i][j];
228 for (
int i = 0; i < 3; i++) m_marks[i] =
v;
251 m_pose.composePoint(bb_min, bb_min);
252 m_pose.composePoint(bb_max, bb_max);
270 for (
int i = 0; i < 3; i++) m_marks[i] =
v;
288 float xmin,
float ymin,
float zmin,
float xmax,
float ymax,
float zmax)
299 int axis,
float yaw_deg,
float pitch_deg,
float roll_deg)
301 ASSERT_(axis >= 0 && axis < 3);
302 m_textRot[axis][0] = yaw_deg;
303 m_textRot[axis][1] = pitch_deg;
304 m_textRot[axis][2] = roll_deg;
307 int axis,
float& yaw_deg,
float& pitch_deg,
float& roll_deg)
const
309 ASSERT_(axis >= 0 && axis < 3);
310 yaw_deg = m_textRot[axis][0];
311 pitch_deg = m_textRot[axis][1];
312 roll_deg = m_textRot[axis][2];