Intersection.LineSphere Method

IntersectionLineSphere Method

Intersects a line with a sphere using exact calculations.

Namespace:  Rhino.Geometry.Intersect
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 5.0
Syntax
public static LineSphereIntersection LineSphere(
	Line line,
	Sphere sphere,
	out Point3d intersectionPoint1,
	out Point3d intersectionPoint2
)
Public Shared Function LineSphere ( 
	line As Line,
	sphere As Sphere,
	<OutAttribute> ByRef intersectionPoint1 As Point3d,
	<OutAttribute> ByRef intersectionPoint2 As Point3d
) As LineSphereIntersection

Parameters

line
Type: Rhino.GeometryLine
Line for intersection.
sphere
Type: Rhino.GeometrySphere
Sphere for intersection.
intersectionPoint1
Type: Rhino.GeometryPoint3d
First intersection point.
intersectionPoint2
Type: Rhino.GeometryPoint3d
Second intersection point.

Return Value

Type: LineSphereIntersection
If None is returned, the first point is the point on the line closest to the sphere and the second point is the point on the sphere closest to the line. If Single is returned, the first point is the point on the line and the second point is the same point on the sphere.
See Also