Fixed category for this node. |
make it basically the same as the intersection page |
||
| Line 16: | Line 16: | ||
|}} | |}} | ||
The '''Ray To Line Intersection Distance''' node | The '''Ray To Line Intersection Distance''' node determines the distance from a ray origin to the point at which the ray intersects a line <em>segment</em> defined by two points. This node is functionally equivalent to using the [[ProtoFlux:Ray To Line Intersection]] node, then plugging the value used for <code>Origin</code> and the <code>Intersection</code> output into a [[ProtoFlux:Distance|Distance]]<float2> node. | ||
== Inputs == | == Inputs == | ||
=== Origin ([[Type:float2|float2]]) === | === Origin ([[Type:float2|float2]]) === | ||
Origin of the ray. | Origin of the ray. | ||
=== Direction ([[Type:float2|float2]]) === | === Direction ([[Type:float2|float2]]) === | ||
Direction of the ray. | Direction of the ray. | ||
=== LinePoint0 ([[Type:float2|float2]]) === | === LinePoint0 ([[Type:float2|float2]]) === | ||
First point of the line segment. | First point of the line segment. | ||
=== LinePoint1 ([[Type:float2|float2]]) === | === LinePoint1 ([[Type:float2|float2]]) === | ||
Second point of the line segment. | Second point of the line segment. | ||
| Line 39: | Line 35: | ||
=== Distance ([[Type:float|float]]) === | === Distance ([[Type:float|float]]) === | ||
The [https://en.wikipedia.org/wiki/Euclidean_distance Euclidean distance] between <code>Origin</code> and the point at which the defined ray intersects with the line segment with endpoints <code>LinePoint0</code> and <code>LinePoint1</code>. If the ray does not intersect, the value will be <code>0</code>. | |||
=== Intersects ([[Type:bool|bool]]) === | === Intersects ([[Type:bool|bool]]) === | ||
<code>True</code> if the ray intersects with the line segment, <code>False</code> otherwise. See [[ProtoFlux:Ray To Line Intersection]] for what counts as intersection. | |||
== See Also == | |||
* [[ProtoFlux:Ray To Line Intersection]] | |||
[[Category:ProtoFlux:Math:Geometry2D]] | [[Category:ProtoFlux:Math:Geometry2D]] | ||
Revision as of 00:31, 3 July 2024
The Ray To Line Intersection Distance node determines the distance from a ray origin to the point at which the ray intersects a line segment defined by two points. This node is functionally equivalent to using the ProtoFlux:Ray To Line Intersection node, then plugging the value used for Origin and the Intersection output into a Distance<float2> node.
Inputs
Origin (float2)
Origin of the ray.
Direction (float2)
Direction of the ray.
LinePoint0 (float2)
First point of the line segment.
LinePoint1 (float2)
Second point of the line segment.
Outputs
Distance (float)
The Euclidean distance between Origin and the point at which the defined ray intersects with the line segment with endpoints LinePoint0 and LinePoint1. If the ray does not intersect, the value will be 0.
Intersects (bool)
True if the ray intersects with the line segment, False otherwise. See ProtoFlux:Ray To Line Intersection for what counts as intersection.