全部產品
Search
文件中心

PolarDB:ST_RayIntersection

更新時間:Jul 06, 2024

批次運算sfmesh與射線的交點。

文法

geometry ST_RayIntersection(sfmesh  sfmesh, geometry mpoint, geometry direction);

傳回值

返回MULTIPOINT對象,代表每條射線與sfmesh的交點,如果無交點則用EMPTY表示。

參數

參數名稱

描述

sfmesh

3D 模型對象。

mpoint

批量射線的端點。

direction

射線的方向。

描述

  • 批次運算一組相同方向射線與sfmesh的交點。

  • mpoint為每條射線的端點,MULTIPOINT類型。

  • direction為所有射線的方向,POINT類型。

樣本

SELECT ST_AsText(ST_RayIntersection('POLYGON((-1 -1 0, 1 -1 0, 1 1 0, -1 1 0, -1 -1 0))'::geometry::meshgeom,
                                    'MULTIPOINT(0 0 0, 0 1 0, 0 -1 0, 0 -2 0)'::geometry,
                                    'POINT(0 1 0)'::geometry));
-----------------------------------------------------
 MULTIPOINT Z ((0 0 0),(0 1 0),(0 -1 0),(0 -1 0))