Crate pi_polygon
Source - Attribute
- LgCfg
- PolygonCfg
- PolygonIndices
- PolygonSlice
- eq_f32
- find_lg_endp
- 作角度为angle(单位: 角度)的直线, 计算其与一个凸多边形的交点, 如果只有一个交点, 返回两个相同的点
polygon 2 维点
- get_one_quarter_arc
- 正方形切 4分之一圆弧
input
⚪心
[f32;2]
弧方向向量
[f32;2]
半径
f32
角度
f32
output
点列表 * 逆时针
Vec<[f32;2]>
- get_one_quarter_arc_with_level
- get_rounded_rect
- 矩形切 圆角
input
左上坐标
- get_rounded_rect_with_level
- interp_by_lg
- 沿指定方向对指定属性列表做指定点的插值
input:
positions 点列表
indices
attrs
lg_attrs
lg_pos
start
end
output:
attrs
- interp_by_lg_0
- in:
points 三维点数据
attrs 多个属性的 各点属性数据集
polygon_indices 多边形顶点数据
lg_attrs 多种属性值列表
lg_pos 插值区间列表
start 插值计算起点
end 插值计算终点
out:
points 中点的属性数据流
- interp_mult_by_lg
- mult_to_triangle
- split_by_lg
- 根据指定切割线列表,切割出多个多边形
input:
positions: 初始点列表
indices: 初始多边形点序号列表
lg_pos: 切割线在切割域内位置
start: 切割域起点
end: 切割域终点
output:
points: 结果点列表
indices: [结果多边形点序号列表]
- split_by_lg_0
- 将一个多边形按照指示方向的多个空间线切分, 返回新的多边形
input:
result: 新的多边形放入result中
points: 初始点数据集 - 三维数据
polygon_indices: 初始多边形点索引列表
lg_pos: 分割百分比列表
start: 分割方向的起点
end: 分割方向的终点
- split_by_radius
- 矩形切圆角矩形
- split_by_radius_0
- 将一个矩形转化为圆角矩形, 返回多边形的顶点流, 顶点为三维顶点
多边形方向:逆时针
- split_by_radius_border
- 矩形切圆角矩形 - 带 边框
- split_by_radius_border_0
- 处理带border 的圆角矩形
input:
x, y: 左上
w, h:矩形大小
radius: 圆角半径
z:
output:
(三维点数据, 多边形点索引)
- split_by_radius_border_with_level
- 处理带border 的圆角矩形
input:
x, y: 左上
w, h:矩形大小
radius: 圆角半径
z:
level: 细分级别 4 / 8 / 16
output:
(三维点数据, 多边形点索引)
- split_by_radius_with_level
- 将一个矩形转化为圆角矩形, 返回多边形的顶点流, 顶点为三维顶点
多边形方向:逆时针
- split_mult_by_lg
- 根据指定切割线列表,切割出多个多边形
input:
positions: [初始点列表]
indices: [初始多边形点序号列表]
lg_pos: 切割线在切割域内位置
start: 切割域起点
end: 切割域终点
output:
points: 结果点列表
indices: [结果多边形点序号列表]
- to_triangle
- to_triangle_0
- LineCfg
- input
起点
[x, y]
终点
[x, y]
划分数据
[percent…]
output
lines
[
a, b, c
]
- Point2D
- (x, y)
- Point3D
- (x, y, z)