geomUtils.intersect 类型
索引
方法
ray_cast检测射线是否与物体有交集ray_plane射线与平面的相交性检测。line_plane线段与平面的相交性检测。ray_triangle射线与三角形的相交性检测。line_triangle线段与三角形的相交性检测。line_quad线段与四边形的相交性检测。ray_sphere射线和球的相交性检测。ray_aabb射线和轴对齐包围盒的相交性检测。ray_obb射线和方向包围盒的相交性检测。aabb_aabb轴对齐包围盒和轴对齐包围盒的相交性检测。aabb_obb轴对齐包围盒和方向包围盒的相交性检测。aabb_plane轴对齐包围盒和平面的相交性检测。aabb_frustum轴对齐包围盒和锥台相交性检测,速度快,但有错误情况。aabb_frustum_accurate轴对齐包围盒和锥台相交性检测,正确处理大多数错误情况。obb_point方向包围盒和点的相交性检测。obb_plane方向包围盒和平面的相交性检测。obb_frustum方向包围盒和锥台相交性检测,速度快,但有错误情况。obb_frustum_accurate方向包围盒和锥台相交性检测,正确处理大多数错误情况。obb_obb方向包围盒和方向包围盒的相交性检测。sphere_plane球与平面的相交性检测。sphere_frustum球和锥台的相交性检测,速度快,但有错误情况。sphere_frustum_accurate球和锥台的相交性检测,正确处理大多数错误情况。sphere_sphere球和球的相交性检测。sphere_aabb球和轴对齐包围盒的相交性检测。sphere_obb球和方向包围盒的相交性检测。resolveg1 和 g2 的相交性检测,可填入基础几何中的形状。
Details
方法
ray_cast
检测射线是否与物体有交集
| meta | description |
|---|---|
| 返回 | |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:88 |
参数列表
rootNode If root is null, then traversal nodes from scene nodeworldRaygeomUtils.RayhandlerFunctionfilterFunction
ray_plane
射线与平面的相交性检测。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:201 |
参数列表
raygeomUtils.RayplanegeomUtils.Plane
line_plane
线段与平面的相交性检测。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:223 |
参数列表
linegeomUtils.LineplanegeomUtils.Plane
ray_triangle
射线与三角形的相交性检测。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:244 |
参数列表
raygeomUtils.RaytrianglegeomUtils.TriangledoubleSidedboolean
line_triangle
线段与三角形的相交性检测。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:287 |
参数列表
linegeomUtils.LinetrianglegeomUtils.TriangleoutPtVec3 optional, The intersection point
line_quad
线段与四边形的相交性检测。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:352 |
参数列表
pVec3 A point on a line segmentqVec3 Another point on the line segmentaVec3 Quadrilateral point abVec3 Quadrilateral point bcVec3 Quadrilateral point cdVec3 Quadrilateral point doutPtVec3 optional, The intersection point
ray_sphere
射线和球的相交性检测。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:445 |
参数列表
raygeomUtils.RayspheregeomUtils.Sphere
ray_aabb
射线和轴对齐包围盒的相交性检测。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:476 |
参数列表
raygeomUtils.RayaabbgeomUtils.Aabb Align the axis around the box
ray_obb
射线和方向包围盒的相交性检测。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:509 |
参数列表
raygeomUtils.RayobbgeomUtils.Obb Direction box
aabb_aabb
轴对齐包围盒和轴对齐包围盒的相交性检测。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:589 |
参数列表
aabb1geomUtils.Aabb Axis alignment surrounds box 1aabb2geomUtils.Aabb Axis alignment surrounds box 2
aabb_obb
轴对齐包围盒和方向包围盒的相交性检测。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:678 |
参数列表
aabbgeomUtils.Aabb Align the axis around the boxobbgeomUtils.Obb Direction box
aabb_plane
轴对齐包围盒和平面的相交性检测。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:733 |
参数列表
aabbgeomUtils.Aabb Align the axis around the boxplanegeomUtils.Plane
aabb_frustum
轴对齐包围盒和锥台相交性检测,速度快,但有错误情况。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:752 |
参数列表
aabbgeomUtils.Aabb Align the axis around the boxfrustumgeomUtils.Frustum
aabb_frustum_accurate
轴对齐包围盒和锥台相交性检测,正确处理大多数错误情况。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:772 |
参数列表
aabbgeomUtils.Aabb Align the axis around the boxfrustumgeomUtils.Frustum
obb_point
方向包围盒和点的相交性检测。
| meta | description |
|---|---|
| 返回 | boolean |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:824 |
参数列表
obbgeomUtils.Obb Direction boxpointgeomUtils.Vec3
obb_plane
方向包围盒和平面的相交性检测。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:843 |
参数列表
obbgeomUtils.Obb Direction boxplanegeomUtils.Plane
obb_frustum
方向包围盒和锥台相交性检测,速度快,但有错误情况。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:870 |
参数列表
obbgeomUtils.Obb Direction boxfrustumgeomUtils.Frustum
obb_frustum_accurate
方向包围盒和锥台相交性检测,正确处理大多数错误情况。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:890 |
参数列表
obbgeomUtils.Obb Direction boxfrustumgeomUtils.Frustum
obb_obb
方向包围盒和方向包围盒的相交性检测。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:949 |
参数列表
obb1geomUtils.Obb Direction box1obb2geomUtils.Obb Direction box2
sphere_plane
球与平面的相交性检测。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:1004 |
参数列表
spheregeomUtils.SphereplanegeomUtils.Plane
sphere_frustum
球和锥台的相交性检测,速度快,但有错误情况。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:1023 |
参数列表
spheregeomUtils.SpherefrustumgeomUtils.Frustum
sphere_frustum_accurate
球和锥台的相交性检测,正确处理大多数错误情况。
| meta | description |
|---|---|
| 返回 | number |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:1043 |
参数列表
spheregeomUtils.SpherefrustumgeomUtils.Frustum
sphere_sphere
球和球的相交性检测。
| meta | description |
|---|---|
| 返回 | boolean |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:1076 |
参数列表
sphere0geomUtils.Spheresphere1geomUtils.Sphere
sphere_aabb
球和轴对齐包围盒的相交性检测。
| meta | description |
|---|---|
| 返回 | boolean |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:1090 |
参数列表
spheregeomUtils.SphereaabbgeomUtils.Aabb
sphere_obb
球和方向包围盒的相交性检测。
| meta | description |
|---|---|
| 返回 | boolean |
| 定义于 | cocos2d/core/geom-utils/intersect.ts:1107 |
参数列表
spheregeomUtils.SphereobbgeomUtils.Obb
resolve
g1 和 g2 的相交性检测,可填入基础几何中的形状。
| meta | description |
|---|---|
| 定义于 | cocos2d/core/geom-utils/intersect.ts:1159 |
参数列表
g1Unknown Geometry 1g2Unknown Geometry 2outPtUnknown optional, Intersection point. (note: only partial shape detection with this return value)