当前位置: 首页 > news >正文

会外语和做网站大连seo外包公司

会外语和做网站,大连seo外包公司,wordpress 站长,艺术设计公司名字3.Arrangement查询 Arrangement里面最重要的查询操作是point-location,给定一个点,查找到包含这个点的Arrangement。通常情况下,point-location查询得到的结果是Arrangement的一个face,退化情况下会是一个edge,查一个…
3.Arrangement查询

Arrangement里面最重要的查询操作是point-location,给定一个点,查找到包含这个点的Arrangement。通常情况下,point-location查询得到的结果是Arrangement的一个face,退化情况下会是一个edge,查一个重合的点。

3.1 point-Location查询
3.3 垂直射线扫描

另一个经常用到Arrangement的查找,是垂直射线扫描查找:给定一个查找点,哪些Arrangement单元会跟从这个点发射的垂直射线相交?一般情况下,可能这个射线交到一边edge,也有可能交到一个vertex,或者这个Arrangement单元不跟这个射线相交。

在前面章节讲到的point-location类,也是一个ArrangementVerticalRayShoot_2概念(concept)的一个model,所以他们全都有成员方法ray_shoot_up(q)和 ray_shoot_down(q),这其中的Q是一个用来查询的point。

在头文件point_location_utils.h中有下面的辅助方法:

template <typename VerticalRayShooting>
void shoot_vertical_ray(const RayShoot& vrs,const typenameVerticalRayShooting::Arrangement_2::Point_2& q)
{typedef VerticalRayShooting                           Vertical_ray_shooting;// Perform the point-location query.typename Vertical_ray_shooting::result_type obj = vrs.ray_shoot_up(q);// Print the result.typedef typename Vertical_ray_shooting::Arrangement_2 Arrangement_2;typedef typename Arrangement_2::Vertex_const_handle   Vertex_const_handle;typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;typedef typename Arrangement_2::Face_const_handle     Face_const_handle;const Vertex_const_handle* v;const Halfedge_const_handle* e;const Face_const_handle* f;std::cout << "Shooting up from (" << q << ") : ";if (v = boost::get<Vertex_const_handle>(&obj))         // we hit a vertexstd::cout << "hit " << (((*v)->is_isolated()) ? "an isolated" : "a")<< " vertex: " << (*v)->point() << std::endl;else if (e = boost::get<Halfedge_const_handle>(&obj))  // we hit an edgestd::cout << "hit an edge: " << (*e)->curve() << std::endl;else if (f = boost::get<Face_const_handle>(&obj)) {    // we hit nothingCGAL_assertion((*f)->is_unbounded());std::cout << "hit nothing.\n";}else CGAL_error();
}

下面的程序段,使用了上面的函数模式,在一个Arrangement上执行垂直射线扫描查询:

// Answering vertical ray-shooting queries.
#include <CGAL/basic.h>
#include <CGAL/Arr_walk_along_line_point_location.h>
#include <CGAL/Arr_trapezoid_ric_point_location.h>
#include "arr_inexact_construction_segments.h"
#include "point_location_utils.h"
typedef CGAL::Arr_walk_along_line_point_location<Arrangement> Walk_pl;
typedef CGAL::Arr_trapezoid_ric_point_location<Arrangement>   Trap_pl;
int main() {// Construct the arrangement.Arrangement arr;construct_segments_arr(arr);// Perform some vertical ray-shooting queries using the walk strategy.Walk_pl walk_pl(arr);shoot_vertical_ray(walk_pl, Point(1, 4));shoot_vertical_ray(walk_pl, Point(4, 3));shoot_vertical_ray(walk_pl, Point(6, 3));// Attach the trapezoid-RIC object to the arrangement and perform queries.Trap_pl trap_pl(arr);shoot_vertical_ray(trap_pl, Point(3, 2));shoot_vertical_ray(trap_pl, Point(5, 2));shoot_vertical_ray(trap_pl, Point(1, 0));return 0;
}

http://www.yayakq.cn/news/833112/

相关文章:

  • 教育网站建设案例装修步骤和流程
  • 专业商城网站建设多少钱上海网络建设公司
  • 如何做转运网站指纹定制网站
  • 写资料的网站有哪些内容群晖 套件 wordpress
  • 网站icp做年检wordpress 聚美主题
  • 如何查询网站的主机如何优化网站代码
  • 网站整站下载器 全站克隆页面图片视频下载 仿站专用源码工具软件北京小客车指标调控管理信息系统
  • 蓝田县住房与城乡建设局网站跨境电商平台有哪些公司
  • 速成建站注册一个空壳建筑公司
  • 出口外贸网站网页制作素材是什么
  • 网站优化的内容移动电子商务网站建设
  • 网站集约化建设项目内容个人微信公众平台怎么用
  • 网站域名备案注销女孩子读电子商务好就业吗
  • 我想做网站怎么做泉州百度网站快速优化
  • 如何建立游戏网站南京已经开始二次感染了
  • 民权平台网站建设优化防疫措施
  • 禹顺生态建设有限公司网站南昌网站设计制作
  • 个人简约网站模板做国外网站需要多少钱
  • 凡科网商城是正规网站吗极速网站制作
  • 南昌网站维护北京做网站建设的公司有哪些
  • 加大整合力度网站集约建设大连网站建设怎么样
  • 电子商务网站登录学校网站开发的项目背景
  • 网站开发算是固定资产吗怎样创建网站网站
  • 网站怎么做json数据建设农场网站
  • 学校特色网站建设情况网站建设详细报价单
  • 淄博建网站建设一个收入支出持平的网站
  • 苏州做管网gis的网站番禺人才网上
  • 外贸公司网站模板免费wordpress文章列分页
  • 网站关键词排名外包瑞翔网站建设
  • 成都门户网站十大网站建设