The Line struct represents a line in 3D space. It provides methods to perform geometric calculations such as finding the closest point on the line to a given point or ray, and calculating distances.
The Line struct represents a line in 3D space. It provides methods to perform geometric calculations such as finding the closest point on the line to a given point or ray, and calculating distances.
Member Name | Summary |
---|---|
Start | Start position of the line. |
End | End position of the line. |
Delta | Returns the result of b - a. |
Center | Returns the midpoint between a and b. |
Member Name | Summary |
---|---|
Trace | Performs a trace along the line with a specified radius and maximum distance. |
ClosestPoint(Vector3&) | Finds the closest point on the line to a given position. |
ClosestPoint(Ray&, Vector3&) | Finds the closest point on the line to a given ray, returning the point on the line. |
ClosestPoint(Ray&, Vector3&, Vector3&) | Finds the closest points on both the line and the ray. |
Distance(Vector3) | Calculates the distance from a point to the line. |
Distance(Vector3, Vector3&) | Calculates the distance from a point to the line and returns the closest point on the line. |
SqrDistance(Vector3) | Calculates the squared distance from a point to the line. |