// Constructor ScaleManipulator::ScaleManipulator (Scalable& scalable, std::size_t segments, float length) : m_free(scalable), m_axis(scalable) { draw_arrowline(length, m_arrow_x.m_line, 0); draw_arrowline(length, m_arrow_y.m_line, 1); draw_arrowline(length, m_arrow_z.m_line, 2); draw_quad(16, m_quad_screen.m_quad); }
// Constructor TranslateManipulator::TranslateManipulator (Translatable& translatable, std::size_t segments, float length) : m_free(translatable), m_axis(translatable), m_arrow_head_x(3 * 2 * (segments << 3)), m_arrow_head_y(3 * 2 * (segments << 3)), m_arrow_head_z(3 * 2 * (segments << 3)) { draw_arrowline(length, m_arrow_x.m_line, 0); draw_arrowhead(segments, length, m_arrow_head_x.m_vertices.data(), TripleRemapXYZ<Vertex3f> (), TripleRemapXYZ< Normal3f> ()); draw_arrowline(length, m_arrow_y.m_line, 1); draw_arrowhead(segments, length, m_arrow_head_y.m_vertices.data(), TripleRemapYZX<Vertex3f> (), TripleRemapYZX< Normal3f> ()); draw_arrowline(length, m_arrow_z.m_line, 2); draw_arrowhead(segments, length, m_arrow_head_z.m_vertices.data(), TripleRemapZXY<Vertex3f> (), TripleRemapZXY< Normal3f> ()); draw_quad(16, m_quad_screen.m_quad); }
// Constructor TranslateManipulator::TranslateManipulator(Translatable& translatable, std::size_t segments, float length) : _translateFree(translatable), _translateAxis(translatable), _arrowHeadX(3 * 2 * (segments << 3)), _arrowHeadY(3 * 2 * (segments << 3)), _arrowHeadZ(3 * 2 * (segments << 3)) { draw_arrowline(length, &_arrowX.front(), 0); draw_arrowhead(segments, length, &_arrowHeadX._vertices.front(), TripleRemapXYZ<Vertex3f>(), TripleRemapXYZ<Normal3f>()); draw_arrowline(length, &_arrowY.front(), 1); draw_arrowhead(segments, length, &_arrowHeadY._vertices.front(), TripleRemapYZX<Vertex3f>(), TripleRemapYZX<Normal3f>()); draw_arrowline(length, &_arrowZ.front(), 2); draw_arrowhead(segments, length, &_arrowHeadZ._vertices.front(), TripleRemapZXY<Vertex3f>(), TripleRemapZXY<Normal3f>()); draw_quad(16, &_quadScreen.front()); }