Appearance
KBE3D / KBCore / Cesium / IntersectionTests / rayTriangleParametric
函数: rayTriangleParametric()
rayTriangleParametric(
ray:Ray,p0:Cartesian3,p1:Cartesian3,p2:Cartesian3,cullBackFaces?:boolean):number
Computes the intersection of a ray and a triangle as a parametric distance along the input ray. The result is negative when the triangle is behind the ray.
Implements MinimumStorage RayTriangle Intersection.pdf | Fast Minimum Storage Ray/Triangle Intersection by Tomas Moller and Ben Trumbore.
参数
ray
The ray.
p0
The first vertex of the triangle.
p1
The second vertex of the triangle.
p2
The third vertex of the triangle.
cullBackFaces?
boolean
If <code>true</code>, will only compute an intersection with the front face of the triangle and return undefined for intersections with the back face.
返回
number
The intersection as a parametric distance along the ray, or undefined if there is no intersection.
