CGAL——學習3
#include <iostream>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <sstream>
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef Kernel::Point_2 Point_2;
int main()
{
Point_2 p(0, 0.3), q, r(2, 0.9);
{
q = Point_2(1, 0.6);
std::cout << (CGAL::collinear(p,q,r) ? "collinear\n" : "not collinear\n");
}
{
std::istringstream input("0 0.3 1 0.6 2 0.9"); //輸入點雲。
input >> p >> q >> r;
std::cout << (CGAL::collinear(p,q,r) ? "collinear\n" : "not collinear\n");
}
{
q = CGAL::midpoint(p,r);
std::cout << (CGAL::collinear(p,q,r) ? "collinear\n" : "not collinear\n");
}
return 0;
}
相關文章
- CGAL——學習2
- CGAL庫——學習一
- MyBatis 3 學習MyBatis
- PHP學習(3)PHP
- 學習perl(3)
- 強化學習-學習筆記3 | 策略學習強化學習筆記
- Python 學習3Python
- Protocol Buffers 3 學習Protocol
- 3/8學習程序
- 3/13學習程序
- 3/19學習程序
- 3/25學習程序
- WebGL學習(3) - 3D模型Web3D模型
- CGAL BOOST 以及對如何安裝庫的思考
- javaweb學習之路(3)CookieJavaWebCookie
- shell學習總結-3
- PHP學習3——陣列PHP陣列
- Vue學習筆記3Vue筆記
- Laravel 學習之路 3 路由Laravel路由
- Thymeleaf 3學習筆記筆記
- MP3 Fuzz學習
- XPath學習:軸(3)——descendant
- CCNA學習筆記3筆記
- 3/5學習進度
- 3/7學習進度
- Spring原始碼學習之:ClassLoader學習(3)Spring原始碼
- 笨方法學Python3 習題3Python
- 下劃線的學習3
- swift學習筆記《3》-技巧Swift筆記
- tensorflow學習筆記3筆記
- Rust 語言學習之旅(3)Rust
- docker學習筆記(3)- 映象Docker筆記
- umi3 原始碼學習原始碼
- NumPy 學習(3): 通用函式函式
- Autodesk Forge 學習簡談 - 3
- Android學習筆記(3)Android筆記
- docker學習3:Docker Hello WorldDocker
- jdbc.psotgresql學習3JDBCOTGSQL