Click or drag to resize
AB4D logo

MathUtilsRayPlaneIntersection Method

RayPlaneIntersection calculates a position where a ray interects a plane. Returns false if there is no intersection.

Namespace:  Ab3d.Utilities
Assembly:  Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 9.2.7447.1045
Syntax
C#
public static bool RayPlaneIntersection(
	Point3D rayOrigin,
	Vector3D rayDirection,
	Point3D pointOnPlane,
	Vector3D planeNormal,
	out Point3D intersectionPoint
)

Parameters

rayOrigin
Type: System.Windows.Media.Media3DPoint3D
ray origin as Point3D
rayDirection
Type: System.Windows.Media.Media3DVector3D
ray direction as Vector3D
pointOnPlane
Type: System.Windows.Media.Media3DPoint3D
Point3D that lies on the plane
planeNormal
Type: System.Windows.Media.Media3DVector3D
normal vector (perpendicular to the plane) that defines the orientation of the plane
intersectionPoint
Type: System.Windows.Media.Media3DPoint3D
returned intersection position

Return Value

Type: Boolean
Returns false is there is no intersection
See Also