Appearance
KBE3D / KBCore / Cesium / IntersectionTests / rayTriangle
函数: rayTriangle()
rayTriangle(
ray:Ray,p0:Cartesian3,p1:Cartesian3,p2:Cartesian3,cullBackFaces?:boolean,result?:Cartesian3):Cartesian3
Computes the intersection of a ray and a triangle as a Cartesian3 coordinate.
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.
result?
The <code>Cartesian3</code> onto which to store the result.
返回
The intersection point or undefined if there is no intersections.
