本文整理汇总了C++中cg::visualization::drawer_type类的典型用法代码示例。如果您正苦于以下问题:C++ drawer_type类的具体用法?C++ drawer_type怎么用?C++ drawer_type使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了drawer_type类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw_node
void draw_node(Node<double> *node, cg::visualization::drawer_type & drawer) const
{
drawer.set_color(Qt::green);
drawer.draw_point(node->point, 3);
if(node->children[0] == NULL)
return;
drawer.set_color(Qt::white);
point_2t<double> c = node->boundary.position;
double d = node->boundary.dimension;
point_2 p1(c.x + d, c.y+d/2);
point_2 p2(c.x + d/2, c.y+d);
point_2 p3(c.x, c.y+d/2);
point_2 p4(c.x+d/2, c.y);
drawer.draw_line(p1, p3);
drawer.draw_line(p2, p4);
draw_node(node->children[0], drawer);
draw_node(node->children[1], drawer);
draw_node(node->children[2], drawer);
draw_node(node->children[3], drawer);
}
示例2: draw
void draw(cg::visualization::drawer_type & drawer) const
{
drawer.set_color(Qt::white);
if (current_point_ && cg::contains(t_, *current_point_))
drawer.set_color(Qt::red);
drawer.draw_line(t_[0], t_[1]);
}
示例3: draw
void draw(cg::visualization::drawer_type & drawer) const
{
for (triangle_2 tr : trs) {
drawer.set_color(Qt::red);
cg::visualization::draw(drawer, tr);
drawer.set_color(Qt::yellow);
cg::visualization::draw(drawer, tr.circumcenter(), tr.circumradius());
}
}
示例4: draw
void draw(cg::visualization::drawer_type & drawer) const
{
std::for_each(answer.begin(), answer.end(),
[&](cg::triangle_2 tr)
{
drawer.set_color(Qt::white);
cg::visualization::draw(drawer, tr);
drawer.set_color(Qt::green);
cg::visualization::draw(drawer, tr.center(), tr.radius());
});
}
示例5: draw
void draw(cg::visualization::drawer_type & drawer) const override
{
drawer.set_color(Qt::white);
if (current_point_ && cg::contains(contour, *current_point_))
drawer.set_color(Qt::green);
for (size_t l = 0, lp = contour.size() - 1; l != contour.size(); lp = l++)
drawer.draw_line(contour[lp], contour[l]);
if (idx_)
drawer.draw_point(contour[*idx_], 5);
}
示例6: draw
void draw(cg::visualization::drawer_type & drawer) const
{
if (count >= 1)
drawer.draw_point(start, 2);
if (count == 2)
drawer.draw_point(finish, 2);
drawer.set_color(Qt::white);
for (unsigned int i = 0; i < input_points.size(); i++)
draw_vector(input_points[i].begin(), input_points[i].end(), drawer);
draw_vector(contour.begin(), contour.end(), drawer);
drawer.set_color(Qt::yellow);
draw_vector(output_points.begin(), output_points.end(), drawer);
}
示例7: draw
void draw(cg::visualization::drawer_type & drawer) const
{
drawer.set_color(Qt::white);
for (point_2 const & p : pts_)
drawer.draw_point(p);
drawer.set_color(Qt::green);
for (size_t lp = ch_size_ - 1, l = 0; l != ch_size_; lp = l++)
{
drawer.draw_point(pts_[l], 3);
drawer.draw_line(pts_[lp], pts_[l]);
}
}
示例8: draw
void draw(cg::visualization::drawer_type & drawer) const
{
drawer.set_color(Qt::white);
if (current_point_ && cg::contains(t_, *current_point_))
drawer.set_color(Qt::green);
for (size_t l = 0, lp = 2; l != 3; lp = l++)
drawer.draw_line(t_[lp], t_[l]);
if (idx_)
{
drawer.set_color((rbutton_pressed_)? Qt::red : Qt::yellow);
drawer.draw_point(t_[*idx_], 5);
}
}
示例9: draw
void draw(cg::visualization::drawer_type & drawer) const
{
if (in_building_)
{
drawer.set_color(Qt::white);
for (size_t i = 1; i < points_.size(); ++i)
{
drawer.draw_line(points_[i - 1], points_[i]);
}
return;
}
}
示例10: draw
void draw(cg::visualization::drawer_type & drawer) const
{
drawer.set_color(Qt::green);
for (segment_2 s : visibility_segments)
drawer.draw_line(s[0], s[1]);
drawer.set_color(Qt::white);
for (contour_2 c : contours)
{
for (auto p = c.begin(); p < c.end(); ++p)
{
drawer.draw_point(*p, 5);
drawer.draw_line(*p, *(++c.circulator(p)));
}
}
}
示例11: draw
void draw(cg::visualization::drawer_type & drawer) const
{
drawer.set_color(Qt::white);
if (cg::has_intersection(s_[0], s_[1]))
drawer.set_color(Qt::green);
for (size_t l = 0; l != 2; l++)
drawer.draw_line(s_[l][0], s_[l][1]);
if (idx_)
{
drawer.set_color(rbutton_pressed_ ? Qt::red : Qt::yellow);
drawer.draw_point(s_[(*idx_).first][(*idx_).second], 5);
}
}
示例12: draw_contour
void draw_contour(contour_2f const& p, cg::visualization::drawer_type & drawer)
{
if (p.size() <= 1)
return;
for (auto a = p.begin(), b = a + 1; b != p.end(); a++, b++)
drawer.draw_line(*a, *b);
}
示例13: draw
void draw(cg::visualization::drawer_type & drawer) const
{
drawer.set_color(Qt::white);
// drawer.draw_line(s_[0], s_[1]);
for (size_t l = 0, lp = 2; l != 3; lp = l++)
{
drawer.draw_line(t_[lp], t_[l]);
drawer.draw_line(s_[lp], s_[l]);
}
drawer.set_color(Qt::green);
for (size_t l = 0, lp = int_.size() - 1; l != int_.size(); lp = l++)
{
drawer.draw_line(int_[lp], int_[l]);
}
}
示例14: draw_vector
void draw_vector(Iter a, Iter c, cg::visualization::drawer_type & drawer)
{
if (a == c)
return;
Iter b = a + 1;
for (; b != c; a++, b++)
drawer.draw_line(*a, *b);
}
示例15: draw
void draw(cg::visualization::drawer_type &drawer) const
{
drawer.set_color(Qt::red);
if(have_first_point) {
drawer.draw_point(first_point, 5);
}
if(have_second_point) {
drawer.draw_point(second_point, 5);
}
if(have_first_point && have_second_point) {
dcel_by_lines->add_line(first_point, second_point);
}
drawer.set_color(Qt::blue);
drow_all_lines(drawer);
}