struct Line
in global
Represents a line in 3D space.
public Vector3 Start { get; }
Start position of the line.
public Vector3 End { get; }
End position of the line.
public Vector3 Delta { get; }
Returns the result of b - a
public Vector3 Center { get; }
Returns the midpoint between a and b
public bool Trace( ref Ray ray, float radius, float maxDistance = 3.4028235E+38 )
Perform a "trace" between this line and given ray. If the 2 lines intersect, returns true.
rayThe ray to test against.radiusRadius of this line, which essentially makes this a capsule, since direct line-to-line intersections are very improbable. Must be above 0.maxDistanceMaximum allowed distance from the origin of the ray to the intersection.- Returns Whether there was an intersection or not.
public Vector3 ClosestPoint( ref Vector3 pos )
Returns closest point on this line to the given point.
public bool ClosestPoint( ref Ray ray, ref Vector3 point_on_line )
Returns closest point on this line to the given ray.
public bool ClosestPoint( ref Ray ray, ref Vector3 point_on_line, ref Vector3 point_on_ray )
Returns closest point on this line to the given ray.
public float Distance( Vector3 pos )
Returns closest distance from this line to given point.
public float Distance( Vector3 pos, ref Vector3 closestPoint )
Returns closest distance from this line to given point.
public float SqrDistance( Vector3 pos )
Returns closest squared distance from this line to given point.
public bool Equals( Line other )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public Line( Vector3 a, Vector3 b )
😔 No documentation found.
public Line( Vector3 origin, Vector3 direction, float length )
😔 No documentation found.