ViewDesignEngine  3.1.0
高性能 CAD 计算几何引擎
vde::foundation::Predicates结构体 参考

统一谓词接口 — 编译时选择 GMP 或自适应双精度后端 更多...

#include <predicates.h>

Public 类型

using Backend = exact::AdaptiveDouble
 使用自适应双精度算术(Shewchuk 算法,默认) 更多...
 

静态 Public 成员函数

static exact::Orientation orient_2d (const Point2D &a, const Point2D &b, const Point2D &c)
 二维定向测试 更多...
 
static exact::Orientation orient_3d (const Point3D &a, const Point3D &b, const Point3D &c, const Point3D &d)
 三维定向测试 更多...
 
static exact::CircleTest in_circle (const Point2D &a, const Point2D &b, const Point2D &c, const Point2D &d)
 圆内测试 更多...
 

详细描述

统一谓词接口 — 编译时选择 GMP 或自适应双精度后端

根据 VDE_USE_GMP 宏自动选择 GmpExact 或 AdaptiveDouble 作为后端。 上层代码只需使用 Predicates,无需关心具体实现。

在文件 predicates.h17 行定义.

成员类型定义说明

◆ Backend

using vde::foundation::Predicates::Backend = exact::AdaptiveDouble

使用自适应双精度算术(Shewchuk 算法,默认)

在文件 predicates.h23 行定义.

成员函数说明

◆ in_circle()

static exact::CircleTest vde::foundation::Predicates::in_circle ( const Point2D a,
const Point2D b,
const Point2D c,
const Point2D d 
)
inlinestatic

圆内测试

参数
a,b,c三角形三顶点
d测试点
返回
圆测试结果

在文件 predicates.h49 行定义.

引用了 vde::foundation::in_circle().

被这些函数引用 vde::foundation::in_circle().

◆ orient_2d()

static exact::Orientation vde::foundation::Predicates::orient_2d ( const Point2D a,
const Point2D b,
const Point2D c 
)
inlinestatic

二维定向测试

参数
a,b,c三点
返回
定向结果

在文件 predicates.h31 行定义.

引用了 vde::foundation::exact::orient_2d().

被这些函数引用 vde::foundation::orient().

◆ orient_3d()

static exact::Orientation vde::foundation::Predicates::orient_3d ( const Point3D a,
const Point3D b,
const Point3D c,
const Point3D d 
)
inlinestatic

三维定向测试

参数
a,b,c,d四点
返回
定向结果

在文件 predicates.h39 行定义.

引用了 vde::foundation::exact::orient_3d().

被这些函数引用 vde::foundation::orient().


该结构体的文档由以下文件生成: