struct
Line
public sealed struct Line Represents a line in 3D space.
Constructors
Properties
Methods
Boolean Trace(Ray ray, Single radius, Single maxDistance = 3.4028235E+38) Perform a "trace" between this line and given ray. If the 2 lines intersect, returns true.
ray — The ray to test against. radius — Radius of this line, which essentially makes this a capsule, since direct line-to-line intersections are very improbable. Must be above 0. maxDistance — Maximum allowed distance from the origin of the ray to the intersection. returns — Whether there was an intersection or not.
Boolean ClosestPoint(Ray ray, Vector3 point_on_line) Returns closest point on this line to the given ray.
Boolean ClosestPoint(Ray ray, Vector3 point_on_line, Vector3 point_on_ray) Returns closest point on this line to the given ray.
Single Distance(Vector3 pos) Returns closest distance from this line to given point.
Single Distance(Vector3 pos, Vector3 closestPoint) Returns closest distance from this line to given point.
Single SqrDistance(Vector3 pos) Returns closest squared distance from this line to given point.
Assembly:
Sandbox.System Full Name: Line